Blender error "Invalid clnors in this fan!" - python

When applying a modifier via the python API to an object the log message "Invalid clnors in this fan!" is shown multiple times.
What are clnors?
What is the meaning of the log message?
How can the error be fixed?

'clnors' is 'custom loop normals'. As I found here this error is shown, well, when there are invalid normals, but it's trying to fix it (code here). If everything is working seems like you can ignore the error.

Related

Sniffing network traffic with scapy, get "Could not activate the pcap handler"

I try to sniff network adapter(TP-LINK, 0bda:b711) with python3 , But I get an OSError: Could not activate the pcap handler
from scapy.all import *
from scapy.config import conf
from scapy.layers.dot11 import Dot11
conf.use_pcap = True
def callBack(pkg):
if pkg.haslayer(Dot11):
if pkg.type == 0 and pkg.subtype == 8:
print("dBm_AntSignal=", pkg.dBm_AntSignal)
print("dBm_AntNoise=", pkg.dBm_AntNoise)
sniff(iface='wlp1s1', monitor='True', prn=callBack)
I think there is something wrong with libpcap, I want to get dBm_AntSignal and dBm_AntNoise from sniff, the code can run Macbook according to other people(you can browse my last question). Is there somebody can solve this issue ?
If you posted issue #1136 on the libpcap issues list, then you presumably somehow managed to determine that pcap_activate() returned PCAP_ERROR. If you did that by modifying the Scapy code, try modifying it further to, if pcap_activate() returns PCAP_ERROR, report the result of pcap_geterr(), in order to try to find out why, in this particular instance, pcap_activate() returned PCAP_ERROR. The problem is that PCAP_ERROR can be returned for a number of different reasons, and it's difficult if not impossible to guess which one it was.
(And then file an issue on Scapy's issue list indicating that the error message for pcap_activate() failing should be based on both the return value from pcap_activate() and, for certain errors, the result of pcap_geterr(). They should also distinguish between error returns from pcap_activate(), which are negative numbers, and warning returns from pcap_activate(), which indicate that the "pcap handler" could be activated, but something unexpected happened, and are positive numbers.)
Update:
No need to file the Scapy issue; I've already submitted a pull request for the change to fix the error reporting, and it's been merged. Apply the changes from that pull request to Scapy and try again.

Getting the error message: "r is null" whenever running a Dash application

I couldn't find any similar issue. This error appears ever since I started developing a Dash application.
The error stack is very long and. I'm not sure it's informative, but I'm adding it in case it is.
(This error originated from the built-in JavaScript code that runs Dash apps. Click to see the full stack trace or open your browser's console.)
value#http://127.0.0.1:8050/_dash-component-suites/dash/dcc/async-graph.js:1:7832
value#http://127.0.0.1:8050/_dash-component-suites/dash/dcc/async-graph.js:1:12619
callComponentWillReceiveProps#http://127.0.0.1:8050/_dash-component-suites/dash/deps/react-dom#16.v2_0_0m1637923178.14.0.js:13111:16
updateClassInstance#http://127.0.0.1:8050/_dash-component-suites/dash/deps/react-dom#16.v2_0_0m1637923178.14.0.js:13313:38
updateClassComponent#http://127.0.0.1:8050/_dash-component-suites/dash/deps/react-dom#16.v2_0_0m1637923178.14.0.js:17242:22
beginWork#http://127.0.0.1:8050/_dash-component-suites/dash/deps/react-dom#16.v2_0_0m1637923178.14.0.js:18755:18
callCallback#http://127.0.0.1:8050/_dash-component-suites/dash/deps/react-dom#16.v2_0_0m1637923178.14.0.js:182:16
invokeGuardedCallbackDev#http://127.0.0.1:8050/_dash-component-suites/dash/deps/react-dom#16.v2_0_0m1637923178.14.0.js:231:18
invokeGuardedCallback#http://127.0.0.1:8050/_dash-component-suites/dash/deps/react-dom#16.v2_0_0m1637923178.14.0.js:286:33
beginWork$1#http://127.0.0.1:8050/_dash-component-suites/dash/deps/react-dom#16.v2_0_0m1637923178.14.0.js:23338:30
performUnitOfWork#http://127.0.0.1:8050/_dash-component-suites/dash/deps/react-dom#16.v2_0_0m1637923178.14.0.js:22292:14
workLoopSync#http://127.0.0.1:8050/_dash-component-suites/dash/deps/react-dom#16.v2_0_0m1637923178.14.0.js:22265:24
performSyncWorkOnRoot#http://127.0.0.1:8050/_dash-component-suites/dash/deps/react-dom#16.v2_0_0m1637923178.14.0.js:21891:11
flushSyncCallbackQueueImpl/<#http://127.0.0.1:8050/_dash-component-suites/dash/deps/react-dom#16.v2_0_0m1637923178.14.0.js:11224:26
unstable_runWithPriority#http://127.0.0.1:8050/_dash-component-suites/dash/deps/react#16.v2_0_0m1637923178.14.0.js:2685:14
runWithPriority$1#http://127.0.0.1:8050/_dash-component-suites/dash/deps/react-dom#16.v2_0_0m1637923178.14.0.js:11174:12
flushSyncCallbackQueueImpl#http://127.0.0.1:8050/_dash-component-suites/dash/deps/react-dom#16.v2_0_0m1637923178.14.0.js:11219:26
flushSyncCallbackQueue#http://127.0.0.1:8050/_dash-component-suites/dash/deps/react-dom#16.v2_0_0m1637923178.14.0.js:11207:5
batchedUpdates$1#http://127.0.0.1:8050/_dash-component-suites/dash/deps/react-dom#16.v2_0_0m1637923178.14.0.js:21997:9
notify#webpack://dash_renderer/./node_modules/react-redux/es/utils/Subscription.js?:24:12
notifyNestedSubs#webpack://dash_renderer/./node_modules/react-redux/es/utils/Subscription.js?:95:20
handleChangeWrapper#webpack://dash_renderer/./node_modules/react-redux/es/utils/Subscription.js?:100:12
dispatch#webpack://dash_renderer/./node_modules/redux/es/redux.js?:307:7
createThunkMiddleware/</</<#webpack://dash_renderer/./node_modules/redux-thunk/es/index.js?:12:16
applyProps#webpack://dash_renderer/./src/observers/executedCallbacks.ts?:74:15
observer/</<#webpack://dash_renderer/./src/observers/executedCallbacks.ts?:115:40
forEach#webpack://dash_renderer/./node_modules/ramda/es/forEach.js?:50:7
_checkForMethod/<#webpack://dash_renderer/./node_modules/ramda/es/internal/_checkForMethod.js?:27:116
f2#webpack://dash_renderer/./node_modules/ramda/es/internal/_curry2.js?:34:14
observer/<#webpack://dash_renderer/./src/observers/executedCallbacks.ts?:102:55
forEach#webpack://dash_renderer/./node_modules/ramda/es/forEach.js?:50:7
_checkForMethod/<#webpack://dash_renderer/./node_modules/ramda/es/internal/_checkForMethod.js?:27:116
f2#webpack://dash_renderer/./node_modules/ramda/es/internal/_curry2.js?:34:14
observer#webpack://dash_renderer/./src/observers/executedCallbacks.ts?:84:51
StoreObserver/</<#webpack://dash_renderer/./src/StoreObserver.ts?:100:9
forEach#webpack://dash_renderer/./node_modules/ramda/es/forEach.js?:50:7
_checkForMethod/<#webpack://dash_renderer/./node_modules/ramda/es/internal/_checkForMethod.js?:27:116
f2#webpack://dash_renderer/./node_modules/ramda/es/internal/_curry2.js?:34:14
StoreObserver/<#webpack://dash_renderer/./src/StoreObserver.ts?:98:51
dispatch#webpack://dash_renderer/./node_modules/redux/es/redux.js?:307:7
createThunkMiddleware/</</<#webpack://dash_renderer/./node_modules/redux-thunk/es/index.js?:12:16
_callee$#webpack://dash_renderer/./src/observers/executingCallbacks.ts?:78:25
c#http://127.0.0.1:8050/_dash-component-suites/dash_bootstrap_components/_components/dash_bootstrap_components.v1_0_0m1637926595.min.js:14:4600
l/s._invoke</<#http://127.0.0.1:8050/_dash-component-suites/dash_bootstrap_components/_components/dash_bootstrap_components.v1_0_0m1637926595.min.js:14:4354
y/</<#http://127.0.0.1:8050/_dash-component-suites/dash_bootstrap_components/_components/dash_bootstrap_components.v1_0_0m1637926595.min.js:14:4963
asyncGeneratorStep#webpack://dash_renderer/./src/observers/executingCallbacks.ts?:13:103
_next#webpack://dash_renderer/./src/observers/executingCallbacks.ts?:15:212
I'd be glad to get your opinions and ideas.
Thanks.
The first thing to check is that PreventUpdate is being used in callbacks to handle null conditions:
def some_callback(some_input):
if (some_input is None):
raise PreventUpdate
The r is null also error occurs for me when errors are raised in my server-side code that leave Dash with nothing to display.
For example, my server-side code throws an error when there are no traces that meet the user-specified criteria. In the screenshot below, you can see that I set a threshold of 0.98 for the y-axis, and there are no traces satisfy that condition. This triggers the error, which means there is no component for Dash to display.
I programmed the Dash function to update my graphs which created another function in the script placed above the Dash app.
I accidentally forgot to return a fig once and then experienced this error, too.
It seems that this error occurs at the beginning of development of a Dash application. Once callback functions were called, the error no longer popped up.

bingads V13 report request fails in python sdk

I try to download a bingads report using python SDK, but I keep getting an error says: "Type not found: 'Aggregation'" after submitting a report request. I've tried all 4 options mentioned in the following link:
https://github.com/BingAds/BingAds-Python-SDK/blob/master/examples/v13/report_requests.py
Authentication process prior to request works just fine.
I execute the following:
report_request = get_report_request(authorization_data.account_id)
reporting_download_parameters = ReportingDownloadParameters(
report_request=report_request,
result_file_directory=FILE_DIRECTORY,
result_file_name=RESULT_FILE_NAME,
overwrite_result_file=True, # Set this value true if you want to overwrite the same file.
timeout_in_milliseconds=TIMEOUT_IN_MILLISECONDS
)
output_status_message("-----\nAwaiting download_report...")
download_report(reporting_download_parameters)
after a careful debugging, it seems that the program fails when trying to execute a command within "reporting_service_manager.py". Here is workflow:
download_report(self, download_parameters):
report_file_path = self.download_file(download_parameters)
then:
download_file(self, download_parameters):
operation = self.submit_download(download_parameters.report_request)
then:
submit_download(self, report_request):
self.normalize_request(report_request)
response = self.service_client.SubmitGenerateReport(report_request)
SubmitGenerateReport starts a sequence of events ending with a call to "_SeviceCall.init" function within "service_client.py", returning an exception "Type not found: 'Aggregation'"
try:
response = self.service_client.soap_client.service.__getattr__(self.name)(*args, **kwargs)
return response
except Exception as ex:
if need_to_refresh_token is False \
and self.service_client.refresh_oauth_tokens_automatically \
and self.service_client._is_expired_token_exception(ex):
need_to_refresh_token = True
else:
raise ex
Can anyone shed some light? .
Thanks
Please be sure to set Aggregation e.g., as shown here.
aggregation = 'Daily'
If the report type does not use aggregation, you can set Aggregation=None.
Does this help?
This may be a bit late 2 months after the fact but maybe this will help someone else. I had the same error (though I suppose it may not be the same issue). It does look like you did what I did (and I'm sure others will as well): copy-paste the Microsoft example code and tried to run it only to find that it didn't work.
I spent quite some time trying to debug the issue and it looked to me like the XML wasn't being searched correctly. I was using suds-py3 for the script at the time so I tried suds-community and everything just worked after that.
I also re-read the Bing Ads API walkthrough for getting started again and found that they recommend suds-jurko instead.
Long story short: If you want to use the bingads API don't use suds-py3, use either suds-community (which I can confirm works for everything I've used the API for) or suds-jurko (which is the one recommended by Microsoft).

How using LINE chat bot "reply_message function" to reply multi-messages to user

I'm trying to use reply_message function to send back multi-messages to user, but I got some trouble in there.
In the official SDK document we know how to using the reply_message function example is:
line_bot_api.reply_message(event.reply_token, TextSendMessage(text = "123"))
And then the Line bot will show the message "123" if user send something messages.
But in the official github it said that "reply_message" function can send
5 messages at same time.
official github Screenshot
official github link
Also, the document said that the request body should send back two parameters:
replyToken and messages (please see the screenshot)
offical reply_message SDK document link
It said put the array of message object into message parameter.
And the array of message object is look like:
the SDK document of message object example link
Another way I found that someone using PHP to implement by using this function.
PHP implement method example
But I still can't find the solution how to send multi messages in the reply_message function by using Python..
I tried to code in Python is:
line_bot_api.reply_message({'reply_token' : event.reply_token, 'messages' : [{'type' : 'text', 'text' : '123'}]})
The error message is:
TypeError: reply_message() missing 1 required positional argument: 'messages'
error message log
I tried another way to put parameters, but still can't work
line_bot_api.reply_message(reply_token = event.reply_token, messages = [{'type' : 'text', 'text' : '123'}])
the error message is:
AttributeError: 'dict' object has no attribute 'as_json_dict'
How can this be done in Python?
Finally, I found the solution.
Here is the example:
line_bot_api.reply_message(event.reply_token, [TextSendMessage(text= reply_text), TextSendMessage(text= reply_text1)])

Error when settingDBus property

I'm trying to set a property of a DBus Interface with Qt5.7.0.
This is the doc:
http://git.kernel.org/cgit/network/ofono/ofono.git/tree/doc/modem-api.txt
and I want to set the Powered property to true.
Here my code:
QDBusInterface *iface = new QDBusInterface("org.ofono", "/hfp/org/bluez/hci0/dev_xx_xx_xx_xx_xx_xx", "org.ofono.Modem", QDBusConnection::systemBus());
iface->call("SetProperty", "Powered", QVariant(true));
and this is the error:
QDBusError("org.freedesktop.DBus.Error.UnknownMethod", "Method "SetProperty" with signature "sb" on interface "org.ofono.Modem" doesn't exist")
The path comes from the GetModem method and it's correct.
Also, I tried the same with Python:
modem = dbus.Interface(bus.get_object('org.ofono', '/hfp/org/bluez/hci0/dev_xx_xx_xx_xx_xx_xx'), 'org.ofono.Modem')
modem.SetProperty('Powered', dbus.Boolean(1))
and it works fine! So the problem is definitely related to my Qt5 code.
How to better understand the error message? Is wrong my signature or it doesn't find the SetProperty method at all?

Categories

Resources