RuntimeError: Invalid signature
dxbdxx opened this issue · 5 comments
I have compiled libqi-python and successfully run many codes. But only thing that doesn't work is the function subscriber:
app.start()
session = app.session
self.memory_service = session.service("ALMemory")
self.touch = self.memory_service.subscriber("TouchChanged")
the subscriber function raise RuntimeError: Invalid signature.
I mainly follow the demo in http://doc.aldebaran.com/2-5/naoqi/sensors/altouch.html?highlight=touchchanged.
Could you tell me how to fix this?
Hello,
Could you give more context about the execution of your code, such as the version of libqi-python you are using and the version of NAOqi you are trying to communicate with ?
Could you try running your code with more verbose logs, by setting the QI_LOG_LEVEL=verbose
environment variable before running your script ?
- I install qibuild by pip and compile libqi-python following README. Here is the python package's version
python: 3.8.5
qi: 3.1.1
qibuild: 3.18
The version of NAOqi in Pepper is 2.5.10.7.
-
I set
os.environ['QI_LOG_LEVEL'] = 'verbose'
in the python script but the terminal only prints "[W] 1681464316.869145 949120 qi.path.sdklayout: No Application was created, trying to deduce paths". -
In addition, the script can run sucessfully locally, i.e. copy the script sensors_touch.py to Pepper and run the script with
python2 sensors_touch.py
is ok.
In addition, the script can run sucessfully locally, i.e. copy the script sensors_touch.py to Pepper and run the script with python2 sensors_touch.py is ok.
This is because when you run the script directly on Pepper, it will use the version of libqi-python that is on Pepper, which is an older version of both libqi & libqi-python.
It seems like a retrocompatibility error with the most recent versions of libqi.
I set QI_LOG_LEVEL=verbose and here is the output
log1.txt
It looks like the log output was truncated.
Thanks for your reply! In fact, the logger output nothing in the line where the error raised, it only record previous output information. Hope this can be fixed in the future!