Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RuntimeError: Invalid signature #18

Closed
dxbdxx opened this issue Apr 13, 2023 · 5 comments
Closed

RuntimeError: Invalid signature #18

dxbdxx opened this issue Apr 13, 2023 · 5 comments

Comments

@dxbdxx
Copy link

dxbdxx commented Apr 13, 2023

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?

@nyibbang
Copy link
Member

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 ?

@dxbdxx
Copy link
Author

dxbdxx commented Apr 14, 2023

  1. 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.

  1. 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".

  2. 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.

@dxbdxx
Copy link
Author

dxbdxx commented Apr 14, 2023

I set QI_LOG_LEVEL=verbose and here is the output
log1.txt

@nyibbang
Copy link
Member

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.

@dxbdxx
Copy link
Author

dxbdxx commented Apr 14, 2023

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!

@dxbdxx dxbdxx closed this as completed Apr 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants