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

Inavlid signature error #13

Closed
ComanderKai77 opened this issue Sep 21, 2022 · 16 comments
Closed

Inavlid signature error #13

ComanderKai77 opened this issue Sep 21, 2022 · 16 comments

Comments

@ComanderKai77
Copy link

I'm using Python 3.5 with the Pepper robot. I want to subscribe to events with

pepper = qi.Application()
pepper.start()
session = pepper.session
memory = session.service("ALMemory")

subscriber = memory.subscriber("ALTouch/TouchChanged") # throws invalid signature
    if subscriber:
        subscriber.signal.connect(touch_event)

The fifth line throws an RuntimeError: Invalid signature.
Does anyone know how to make this work?

@nyibbang
Copy link
Member

Hello,

Thank you for your report. Which version of NAOqi are you using, and which version of libqi-python is shipped with it ?

@ComanderKai77
Copy link
Author

Thank you for your fast response.
I'm using NAOqi v. 2.5.8 (found in /var/log/naoqi/servicemanager/system.Naoqi.log) and libqi-python v. 3.0.0 (from https://pypi.org/project/qi/).
Please let me know if you need more info.

@nyibbang
Copy link
Member

Are you running libqi-python from your desktop to connect to the robot ?

@ComanderKai77
Copy link
Author

I'm currently using libqi-python in a debian virtual machine on my desktop.

@nyibbang
Copy link
Member

Okay, can you try passing Python arguments to the Application:

-pepper = qi.Application()
+pepper = qi.Application(sys.argv)
 pepper.start()
 session = pepper.session
 memory = session.service("ALMemory")

then raise the log-level of your application by passing --qi-log-level verbose to the command-line.

@ComanderKai77
Copy link
Author

Unfortunately I don't have access to a real robot at the moment so I can't send you the logs until monday but I really appreciate your help.

@ComanderKai77
Copy link
Author

With the following code we get the error log from below.

import qi
import sys

def touch_event(*args, **kwargs):
    pass

pepper = qi.Application(sys.argv, url="tcp://192.168.0.104")
pepper.start()
session = pepper.session
memory = session.service("ALMemory")

subscriber = memory.subscriber("ALTouch/TouchChanged") # throws invalid signature
if subscriber:
    subscriber.signal.connect(touch_event)
[W] 1664131647.412879 8 qi.path.sdklayout: No Application was created, trying to deduce paths
[V] 1664131647.415289 8 qi.applicationsession: Connect URL is now: tcp://192.168.0.104:9559
[V] 1664131647.415701 8 qi.applicationsession: Listen URLs are now: tcp://127.0.0.1:0
[V] 1664131647.419556 8 qi.eventloop: start: thread count limits: initial (minimum, maximum) before any adjustment = (-1, 0)
[V] 1664131647.419789 8 qi.eventloop: start: thread count limits: min <- 2 (read from environment variable QI_EVENTLOOP_MIN_THREADS, with default 2)
[V] 1664131647.419871 8 qi.eventloop: start: thread count limits: max <- 150 (read from environment variable QI_EVENTLOOP_MAX_THREADS, with default 150)
[V] 1664131647.419900 8 qi.eventloop: start: thread count limits: final (minimum, maximum) after potential adjustment = (2, 150)
[V] 1664131647.419916 8 qi.eventloop: start: number of threads that will be launched = 3 (between (min, max) = (2, 150))
[V] 1664131647.421269 8 qitype.type: Shared pointer to unknown type N2qi13MessageSocketE, assuming object not yet registered
[V] 1664131647.421556 8 qitype.type: Shared pointer to unknown type N2qi13MessageSocketE, assuming object not yet registered
[V] 1664131647.423943 8 qitype.type: Shared pointer to unknown type N2qi13MessageSocketE, assuming object not yet registered
[V] 1664131647.426540 8 qitype.type: registerType: access to type factory before registration detected for type N2qi16ServiceDirectoryE
[V] 1664131647.426835 8 qitype.type: registerType: access to type factory before registration detected for type N2qi6FutureImEE
[V] 1664131647.427422 8 qitype.type: registerType: access to type factory before registration detected for type N2qi6FutureINS_8AnyValueEEE
[V] 1664131647.428908 8 qitype.type: registerType: access to type factory before registration detected for type N2qi11BoundObjectE
[V] 1664131647.432652 8 qi.eventloop: start: thread count limits: initial (minimum, maximum) before any adjustment = (1, 1)
[V] 1664131647.432810 8 qi.eventloop: start: thread count limits: final (minimum, maximum) after potential adjustment = (1, 1)
[V] 1664131647.432840 8 qi.eventloop: start: number of threads that will be launched = 1 (between (min, max) = (1, 1))
[V] 1664131647.433015 8 qimessaging.messagesocket: (ResolverUrlList)0x562c90abe030: Trying to connect to 192.168.0.104:9559
[V] 1664131647.447622 11 qimessaging.remoteobject: Requesting metaobject
[V] 1664131647.470106 9 qimessaging.remoteobject: Fetched metaobject
[V] 1664131647.484641 9 qimessaging.server: 0x562c90a9e088 - New socket 0x562c90abc660 added to the server.
[V] 1664131647.490206 11 qimessaging.session: Inserting sd to cache for b7c6b309-1e88-4e5b-9f17-fd9baa4595ed tcp://192.168.0.104:9559
[V] 1664131647.493854 8 qitype.type: registerType: access to type factory before registration detected for type N2qi10FutureSyncINS_8AnyValueEEE
[V] 1664131647.494712 8 qitype.type: registerType: access to type factory before registration detected for type N2qi7PromiseINS_8AnyValueEEE
[V] 1664131647.500076 8 qimessaging.sessionservice: Asynchronously asking service 'ALMemory' to SD client. requestId = 1
[V] 1664131647.510860 9 qitype.genericvalue: Conversion glitch: tuple size mismatch between DefaultTupleType<Ss,j,Ss,j,DefaultListType<Ss>(0x7f5b14001b30),Ss,>(0x7f5b2400f8d0) and N2qi11ServiceInfoE
[V] 1664131647.511757 9 qimessaging.sessionservice: Received answer from SD client for service 'ALMemory'. requestId = 1
[V] 1664131647.511960 9 qimessaging.sessionservice: Requesting socket from cache. service = 'ALMemory', requestId = 1
[V] 1664131647.512047 9 qimessaging.sessionservice: Got transport socket for service. requestId = 1
[V] 1664131647.512254 9 qimessaging.remoteobject: Requesting metaobject
[V] 1664131647.512865 9 qimessaging.sessionservice: Fetching metaobject (2) for requestId = 1
[V] 1664131647.542183 9 qimessaging.remoteobject: Fetched metaobject
[V] 1664131647.544755 9 qimessaging.sessionservice: Got metaobject for request id = 1
[V] 1664131647.548516 8 qimessaging.sessionservice: Found service 'ALMemory' in the registered remote objects.
Traceback (most recent call last):
  File "test.py", line 12, in <module>
    subscriber = memory.subscriber("ALTouch/TouchChanged") # throws invalid signature
RuntimeError: Invalid signature
[V] 1664131647.575554 15 qimessaging.server: Closing server...
[V] 1664131647.579308 15 qi.eventloop: Waiting for the ping thread ...
[V] 1664131647.934475 15 qi.eventloop: Waiting threads from the pool "MainEventLoop", remaining tasks: 7 (0 active)...
[V] 1664131647.934878 15 qi.eventloop: Waiting threads from the pool "EventLoopNetwork", remaining tasks: 0 (0 active)...```

@nyibbang
Copy link
Member

nyibbang commented Sep 26, 2022

I'm not sure what's wrong. I'm betting there is too much of a difference between the libqi version your libqi-python is embedding with the libqi version of your NAOqi, but as far as I know it should be compatible.

Could you try printing the metaobject of the ALMemory service :

memory = session.service("ALMemory")
print(memory.metaObject())

@ComanderKai77
Copy link
Author

ComanderKai77 commented Sep 26, 2022

JSON Log
{
   "methods":{
      "0":{
         "name":"registerEvent",
         "returnDescription":"",
         "returnSignature":"L",
         "description":"",
         "parameters":[
            
         ],
         "parametersSignature":"(IIL)",
         "uid":0
      },
      "1":{
         "name":"unregisterEvent",
         "returnDescription":"",
         "returnSignature":"v",
         "description":"",
         "parameters":[
            
         ],
         "parametersSignature":"(IIL)",
         "uid":1
      },
      "2":{
         "name":"metaObject",
         "returnDescription":"",
         "returnSignature":"({I(Issss[(ss)<MetaMethodParameter,name,description>]s)<MetaMethod,uid,returnSignature,name,parametersSignature,description,parameters,returnDescription>}{I(Iss)<MetaSignal,uid,name,signature>}{I(Iss)<MetaProperty,uid,name,signature>}s)<MetaObject,methods,signals,properties,description>",
         "description":"",
         "parameters":[
            
         ],
         "parametersSignature":"(I)",
         "uid":2
      },
      "3":{
         "name":"terminate",
         "returnDescription":"",
         "returnSignature":"v",
         "description":"",
         "parameters":[
            
         ],
         "parametersSignature":"(I)",
         "uid":3
      },
      "132":{
         "name":"getType",
         "returnDescription":"String type: Data, Event, MicroEvent",
         "returnSignature":"s",
         "description":"Gets the storage class of the stored data. This is not the underlying POD type.",
         "parameters":[
            {
               "name":"key",
               "description":"Name of the variable"
            }
         ],
         "parametersSignature":"(s)",
         "uid":132
      },
      "5":{
         "name":"property",
         "returnDescription":"",
         "returnSignature":"m",
         "description":"",
         "parameters":[
            
         ],
         "parametersSignature":"(m)",
         "uid":5
      },
      "6":{
         "name":"setProperty",
         "returnDescription":"",
         "returnSignature":"v",
         "description":"",
         "parameters":[
            
         ],
         "parametersSignature":"(mm)",
         "uid":6
      },
      "7":{
         "name":"properties",
         "returnDescription":"",
         "returnSignature":"[s]",
         "description":"",
         "parameters":[
            
         ],
         "parametersSignature":"()",
         "uid":7
      },
      "8":{
         "name":"registerEventWithSignature",
         "returnDescription":"",
         "returnSignature":"L",
         "description":"",
         "parameters":[
            
         ],
         "parametersSignature":"(IILs)",
         "uid":8
      },
      "137":{
         "name":"insertListData",
         "returnDescription":"",
         "returnSignature":"v",
         "description":"Inserts a list of key-value pairs into memory.",
         "parameters":[
            {
               "name":"list",
               "description":"An ALValue list of the form [[Key, Value],...]. Each item will be inserted."
            }
         ],
         "parametersSignature":"(m)",
         "uid":137
      },
      "128":{
         "name":"getExtractorEvent",
         "returnDescription":"A list containing the names of the events associated with the given extractor",
         "returnSignature":"[s]",
         "description":"Gets the list of all events generated by a given extractor",
         "parameters":[
            {
               "name":"extractorName",
               "description":"The name of the extractor"
            }
         ],
         "parametersSignature":"(s)",
         "uid":128
      },
      "139":{
         "name":"raiseMicroEvent",
         "returnDescription":"",
         "returnSignature":"v",
         "description":"Publishes the given data to all subscribers.",
         "parameters":[
            {
               "name":"name",
               "description":"Name of the event to raise."
            },
            {
               "name":"value",
               "description":"The data associated with the event. This could contain a basic type, or a more complex array. See the ALValue documentation for more information."
            }
         ],
         "parametersSignature":"(sm)",
         "uid":139
      },
      "140":{
         "name":"removeData",
         "returnDescription":"",
         "returnSignature":"v",
         "description":"Removes a key-value pair from memory",
         "parameters":[
            {
               "name":"key",
               "description":"Name of the data to be removed."
            }
         ],
         "parametersSignature":"(s)",
         "uid":140
      },
      "130":{
         "name":"getMicroEventList",
         "returnDescription":"A list containing the names of all the microEvents",
         "returnSignature":"[s]",
         "description":"Gets a list containing the names of all the declared micro events",
         "parameters":[
            
         ],
         "parametersSignature":"()",
         "uid":130
      },
      "142":{
         "name":"removeMicroEvent",
         "returnDescription":"",
         "returnSignature":"v",
         "description":"Removes a micro event from memory and unsubscribes any exiting subscribers.",
         "parameters":[
            {
               "name":"name",
               "description":"Name of the event to remove."
            }
         ],
         "parametersSignature":"(s)",
         "uid":142
      },
      "143":{
         "name":"subscribeToEvent",
         "returnDescription":"",
         "returnSignature":"v",
         "description":"Subscribes to an event and automaticaly launches the module that declared itself as the generator of the event if required.",
         "parameters":[
            {
               "name":"name",
               "description":"The name of the event to subscribe to"
            },
            {
               "name":"callbackModule",
               "description":"Name of the module to call with notifications"
            },
            {
               "name":"callbackMethod",
               "description":"Name of the module's method to call when a data is changed"
            }
         ],
         "parametersSignature":"(sss)",
         "uid":143
      },
      "144":{
         "name":"subscribeToEvent",
         "returnDescription":"",
         "returnSignature":"v",
         "description":"DEPRECATED Subscribes to event and automaticaly launches the module capable of generating the event if it is not already running. Please use the version without the callbackMessage parameter.",
         "parameters":[
            {
               "name":"name",
               "description":"The name of the event to subscribe to"
            },
            {
               "name":"callbackModule",
               "description":"Name of the module to call with notifications"
            },
            {
               "name":"callbackMessage",
               "description":"DEPRECATED Message included in the notification."
            },
            {
               "name":"callbacMethod",
               "description":"Name of the module's method to call when a data is changed"
            }
         ],
         "parametersSignature":"(ssss)",
         "uid":144
      },
      "145":{
         "name":"subscribeToMicroEvent",
         "returnDescription":"",
         "returnSignature":"v",
         "description":"Subscribes to a microEvent. Subscribed modules are notified on theircallback method whenever the data is updated, even if the new value is the same as the old value.",
         "parameters":[
            {
               "name":"name",
               "description":"Name of the data."
            },
            {
               "name":"callbackModule",
               "description":"Name of the module to call with notifications"
            },
            {
               "name":"callbackMessage",
               "description":"Message included in the notification. This can be used to disambiguate multiple subscriptions."
            },
            {
               "name":"callbackMethod",
               "description":"Name of the module's method to call when a data is changed"
            }
         ],
         "parametersSignature":"(ssss)",
         "uid":145
      },
      "146":{
         "name":"unregisterModuleReference",
         "returnDescription":"",
         "returnSignature":"v",
         "description":"Informs ALMemory that a module doesn't exist anymore.",
         "parameters":[
            {
               "name":"moduleName",
               "description":"Name of the departing module."
            }
         ],
         "parametersSignature":"(s)",
         "uid":146
      },
      "131":{
         "name":"getSubscribers",
         "returnDescription":"List of subscriber names",
         "returnSignature":"[s]",
         "description":"Gets a list containing the names of subscribers to an event.",
         "parameters":[
            {
               "name":"name",
               "description":"Name of the event or micro-event"
            }
         ],
         "parametersSignature":"(s)",
         "uid":131
      },
      "148":{
         "name":"unsubscribeToEvent",
         "returnDescription":"",
         "returnSignature":"v",
         "description":"Unsubscribes a module from the given event. No further notifications will be received.",
         "parameters":[
            {
               "name":"name",
               "description":"The name of the event"
            },
            {
               "name":"callbackModule",
               "description":"The name of the module that was given when subscribing."
            }
         ],
         "parametersSignature":"(ss)",
         "uid":148
      },
      "149":{
         "name":"unsubscribeToMicroEvent",
         "returnDescription":"",
         "returnSignature":"v",
         "description":"Unsubscribes from the given event. No further notifications will be received.",
         "parameters":[
            {
               "name":"name",
               "description":"Name of the event."
            },
            {
               "name":"callbackModule",
               "description":"The name of the module that was given when subscribing."
            }
         ],
         "parametersSignature":"(ss)",
         "uid":149
      },
      "150":{
         "name":"_insertObject",
         "returnDescription":"return an array of data's string name.",
         "returnSignature":"v",
         "description":"Insert object in ALMemory. Please use ALMemoryFastAccess",
         "parameters":[
            {
               "name":"name",
               "description":"ALMemory data name"
            },
            {
               "name":"buffer",
               "description":"buffer in ALValue"
            },
            {
               "name":"bufferSize",
               "description":"buffer size"
            }
         ],
         "parametersSignature":"(smi)",
         "uid":150
      },
      "151":{
         "name":"_subscribeOnDataSetTimePolicy",
         "returnDescription":"",
         "returnSignature":"v",
         "description":"Allows modules to change time policy of already subscribed data.",
         "parameters":[
            {
               "name":"name",
               "description":"Name of the data."
            },
            {
               "name":"callbackModule",
               "description":"Name of the module."
            },
            {
               "name":"nTimePolicy",
               "description":"time of new policy in ms. Default is 0: no time policy: called at every change/insert. If timepolicy > 0, we will not notifiy under timepolicy even if data change under timepolicy frequency"
            }
         ],
         "parametersSignature":"(ssi)",
         "uid":151
      },
      "152":{
         "name":"_subscribeOnDataSetSynchronizeResponse",
         "returnDescription":"",
         "returnSignature":"v",
         "description":"Receives notifications in the same order that the event were sent. This is slower than",
         "parameters":[
            {
               "name":"name",
               "description":"Name of the data."
            },
            {
               "name":"callbackModule",
               "description":"Name of the module."
            },
            {
               "name":"synchronizedResponse",
               "description":"True to receive notifications in the same order as events are sent"
            }
         ],
         "parametersSignature":"(ssb)",
         "uid":152
      },
      "153":{
         "name":"setDescription",
         "returnDescription":"",
         "returnSignature":"v",
         "description":"Describe a key",
         "parameters":[
            {
               "name":"name",
               "description":"Name of the key."
            },
            {
               "name":"description",
               "description":"The description of the event (text format)."
            }
         ],
         "parametersSignature":"(ss)",
         "uid":153
      },
      "154":{
         "name":"getDescriptionList",
         "returnDescription":"an array of tuple (name, type, description) describing all keys.",
         "returnSignature":"m",
         "description":"Descriptions of all given keys",
         "parameters":[
            {
               "name":"keylist",
               "description":"List of keys. (empty to get all descriptions)"
            }
         ],
         "parametersSignature":"([s])",
         "uid":154
      },
      "155":{
         "name":"addMapping",
         "returnDescription":"",
         "returnSignature":"v",
         "description":"Add a mapping between signal and event",
         "parameters":[
            {
               "name":"service",
               "description":"Name of the service"
            },
            {
               "name":"signal",
               "description":"Name of the signal"
            },
            {
               "name":"event",
               "description":"Name of the event"
            }
         ],
         "parametersSignature":"(sss)",
         "uid":155
      },
      "156":{
         "name":"addMapping",
         "returnDescription":"",
         "returnSignature":"v",
         "description":"Add a mapping between signal and event",
         "parameters":[
            {
               "name":"service",
               "description":"Name of the service"
            },
            {
               "name":"signalEvent",
               "description":"A map of signal corresponding to event"
            }
         ],
         "parametersSignature":"(s{ss})",
         "uid":156
      },
      "133":{
         "name":"insertData",
         "returnDescription":"",
         "returnSignature":"v",
         "description":"Inserts a key-value pair into memory, where value is an int",
         "parameters":[
            {
               "name":"key",
               "description":"Name of the value to be inserted."
            },
            {
               "name":"value",
               "description":"The int to be inserted"
            }
         ],
         "parametersSignature":"(si)",
         "uid":133
      },
      "134":{
         "name":"insertData",
         "returnDescription":"",
         "returnSignature":"v",
         "description":"Inserts a key-value pair into memory, where value is a float",
         "parameters":[
            {
               "name":"key",
               "description":"Name of the value to be inserted."
            },
            {
               "name":"value",
               "description":"The float to be inserted"
            }
         ],
         "parametersSignature":"(sf)",
         "uid":134
      },
      "129":{
         "name":"getListData",
         "returnDescription":"An array containing all the values corresponding to the given keys.",
         "returnSignature":"m",
         "description":"Gets the values associated with the given list of keys. This is more efficient than calling getData many times, especially over the network.",
         "parameters":[
            {
               "name":"keyList",
               "description":"An array containing the key names."
            }
         ],
         "parametersSignature":"(m)",
         "uid":129
      },
      "135":{
         "name":"insertData",
         "returnDescription":"",
         "returnSignature":"v",
         "description":"Inserts a key-value pair into memory, where value is a string",
         "parameters":[
            {
               "name":"key",
               "description":"Name of the value to be inserted."
            },
            {
               "name":"value",
               "description":"The string to be inserted"
            }
         ],
         "parametersSignature":"(ss)",
         "uid":135
      },
      "136":{
         "name":"insertData",
         "returnDescription":"",
         "returnSignature":"v",
         "description":"Inserts a key-value pair into memory, where value is an ALValue",
         "parameters":[
            {
               "name":"key",
               "description":"Name of the value to be inserted."
            },
            {
               "name":"data",
               "description":"The ALValue to be inserted. This could contain a basic type, or a more complex array. See the ALValue documentation for more information."
            }
         ],
         "parametersSignature":"(sm)",
         "uid":136
      },
      "138":{
         "name":"raiseEvent",
         "returnDescription":"",
         "returnSignature":"v",
         "description":"Publishes the given data to all subscribers.",
         "parameters":[
            {
               "name":"name",
               "description":"Name of the event to raise."
            },
            {
               "name":"value",
               "description":"The data associated with the event. This could contain a basic type, or a more complex array. See the ALValue documentation for more information."
            }
         ],
         "parametersSignature":"(sm)",
         "uid":138
      },
      "147":{
         "name":"_perf",
         "returnDescription":"",
         "returnSignature":"v",
         "description":"ALMemory performance",
         "parameters":[
            
         ],
         "parametersSignature":"()",
         "uid":147
      },
      "141":{
         "name":"removeEvent",
         "returnDescription":"",
         "returnSignature":"v",
         "description":"Removes a event from memory and unsubscribes any exiting subscribers.",
         "parameters":[
            {
               "name":"name",
               "description":"Name of the event to remove."
            }
         ],
         "parametersSignature":"(s)",
         "uid":141
      },
      "80":{
         "name":"isStatsEnabled",
         "returnDescription":"",
         "returnSignature":"b",
         "description":"",
         "parameters":[
            
         ],
         "parametersSignature":"()",
         "uid":80
      },
      "81":{
         "name":"enableStats",
         "returnDescription":"",
         "returnSignature":"v",
         "description":"",
         "parameters":[
            
         ],
         "parametersSignature":"(b)",
         "uid":81
      },
      "82":{
         "name":"stats",
         "returnDescription":"",
         "returnSignature":"{I(I(fff)<MinMaxSum,minValue,maxValue,cumulatedValue>(fff)<MinMaxSum,minValue,maxValue,cumulatedValue>(fff)<MinMaxSum,minValue,maxValue,cumulatedValue>)<MethodStatistics,count,wall,user,system>}",
         "description":"",
         "parameters":[
            
         ],
         "parametersSignature":"()",
         "uid":82
      },
      "83":{
         "name":"clearStats",
         "returnDescription":"",
         "returnSignature":"v",
         "description":"",
         "parameters":[
            
         ],
         "parametersSignature":"()",
         "uid":83
      },
      "84":{
         "name":"isTraceEnabled",
         "returnDescription":"",
         "returnSignature":"b",
         "description":"",
         "parameters":[
            
         ],
         "parametersSignature":"()",
         "uid":84
      },
      "85":{
         "name":"enableTrace",
         "returnDescription":"",
         "returnSignature":"v",
         "description":"",
         "parameters":[
            
         ],
         "parametersSignature":"(b)",
         "uid":85
      },
      "100":{
         "name":"exit",
         "returnDescription":"",
         "returnSignature":"v",
         "description":"Exits and unregisters the module.",
         "parameters":[
            
         ],
         "parametersSignature":"()",
         "uid":100
      },
      "101":{
         "name":"__pCall",
         "returnDescription":"",
         "returnSignature":"i",
         "description":"Internal function to pCall methods",
         "parameters":[
            
         ],
         "parametersSignature":"(I[m])",
         "uid":101
      },
      "102":{
         "name":"pCall",
         "returnDescription":"",
         "returnSignature":"m",
         "description":"NAOqi1 pCall method.",
         "parameters":[
            
         ],
         "parametersSignature":"m",
         "uid":102
      },
      "103":{
         "name":"version",
         "returnDescription":"A string containing the version of the module.",
         "returnSignature":"s",
         "description":"Returns the version of the module.",
         "parameters":[
            
         ],
         "parametersSignature":"()",
         "uid":103
      },
      "104":{
         "name":"ping",
         "returnDescription":"returns true",
         "returnSignature":"b",
         "description":"Just a ping. Always returns true",
         "parameters":[
            
         ],
         "parametersSignature":"()",
         "uid":104
      },
      "105":{
         "name":"getMethodList",
         "returnDescription":"An array of method names.",
         "returnSignature":"[s]",
         "description":"Retrieves the module's method list.",
         "parameters":[
            
         ],
         "parametersSignature":"()",
         "uid":105
      },
      "106":{
         "name":"getMethodHelp",
         "returnDescription":"A structure containing the method's description.",
         "returnSignature":"m",
         "description":"Retrieves a method's description.",
         "parameters":[
            {
               "name":"methodName",
               "description":"The name of the method."
            }
         ],
         "parametersSignature":"(s)",
         "uid":106
      },
      "107":{
         "name":"getModuleHelp",
         "returnDescription":"A structure describing the module.",
         "returnSignature":"m",
         "description":"Retrieves the module's description.",
         "parameters":[
            
         ],
         "parametersSignature":"()",
         "uid":107
      },
      "108":{
         "name":"wait",
         "returnDescription":"True if the timeout period terminated. False if the method returned.",
         "returnSignature":"b",
         "description":"Wait for the end of a long running method that was called using 'post'",
         "parameters":[
            {
               "name":"id",
               "description":"The ID of the method that was returned when calling the method using 'post'"
            },
            {
               "name":"timeoutPeriod",
               "description":"The timeout period in ms. To wait indefinately, use a timeoutPeriod of zero."
            }
         ],
         "parametersSignature":"(ii)",
         "uid":108
      },
      "109":{
         "name":"wait",
         "returnDescription":"",
         "returnSignature":"v",
         "description":"Wait for the end of a long running method that was called using 'post', returns a cancelable future",
         "parameters":[
            {
               "name":"id",
               "description":"The ID of the method that was returned when calling the method using 'post'"
            }
         ],
         "parametersSignature":"(i)",
         "uid":109
      },
      "110":{
         "name":"isRunning",
         "returnDescription":"True if the method is currently running",
         "returnSignature":"b",
         "description":"Returns true if the method is currently running.",
         "parameters":[
            {
               "name":"id",
               "description":"The ID of the method that was returned when calling the method using 'post'"
            }
         ],
         "parametersSignature":"(i)",
         "uid":110
      },
      "111":{
         "name":"stop",
         "returnDescription":"",
         "returnSignature":"v",
         "description":"returns true if the method is currently running",
         "parameters":[
            {
               "name":"id",
               "description":"the ID of the method to wait for"
            }
         ],
         "parametersSignature":"(i)",
         "uid":111
      },
      "112":{
         "name":"getBrokerName",
         "returnDescription":"The name of the parent broker.",
         "returnSignature":"s",
         "description":"Gets the name of the parent broker.",
         "parameters":[
            
         ],
         "parametersSignature":"()",
         "uid":112
      },
      "113":{
         "name":"getUsage",
         "returnDescription":"A string that summarises the usage of the method.",
         "returnSignature":"s",
         "description":"Gets the method usage string. This summarises how to use the method.",
         "parameters":[
            {
               "name":"name",
               "description":"The name of the method."
            }
         ],
         "parametersSignature":"(s)",
         "uid":113
      },
      "114":{
         "name":"declareEvent",
         "returnDescription":"",
         "returnSignature":"v",
         "description":"Declares an event to allow future subscriptions to the event",
         "parameters":[
            {
               "name":"eventName",
               "description":"The name of the event"
            }
         ],
         "parametersSignature":"(s)",
         "uid":114
      },
      "115":{
         "name":"declareEvent",
         "returnDescription":"",
         "returnSignature":"v",
         "description":"Declares an event to allow future subscriptions to the event",
         "parameters":[
            {
               "name":"eventName",
               "description":"The name of the event"
            },
            {
               "name":"extractorName",
               "description":"The name of the extractor capable of creating the event"
            }
         ],
         "parametersSignature":"(ss)",
         "uid":115
      },
      "116":{
         "name":"getData",
         "returnDescription":"The data as an ALValue. This can often be cast transparently into the original type.",
         "returnSignature":"m",
         "description":"Gets the value of a key-value pair stored in memory",
         "parameters":[
            {
               "name":"key",
               "description":"Name of the value."
            }
         ],
         "parametersSignature":"(s)",
         "uid":116
      },
      "117":{
         "name":"getData",
         "returnDescription":"The data as an ALValue",
         "returnSignature":"m",
         "description":"DEPRECATED - Gets the value of a key-value pair stored in memory. Please use the version of this method with no second parameter.",
         "parameters":[
            {
               "name":"key",
               "description":"Name of the value."
            },
            {
               "name":"deprecatedParameter",
               "description":"DEPRECATED - This parameter has no effect, but is left for compatibility reason."
            }
         ],
         "parametersSignature":"(si)",
         "uid":117
      },
      "118":{
         "name":"subscriber",
         "returnDescription":"An AnyObject with a signal named \"signal\"",
         "returnSignature":"o",
         "description":"Get an object wrapping a signal bound to the given ALMemory event. Creates the event if it does not exist.",
         "parameters":[
            {
               "name":"eventName",
               "description":"Name of the ALMemory event"
            }
         ],
         "parametersSignature":"(s)",
         "uid":118
      },
      "119":{
         "name":"getTimestamp",
         "returnDescription":"A list of all the data key names that contain the given string.",
         "returnSignature":"m",
         "description":"Get data value and timestamp",
         "parameters":[
            {
               "name":"key",
               "description":"Name of the variable"
            }
         ],
         "parametersSignature":"(s)",
         "uid":119
      },
      "120":{
         "name":"getEventHistory",
         "returnDescription":"A list of all the data key names that contain the given string.",
         "returnSignature":"m",
         "description":"Get data value and timestamp",
         "parameters":[
            {
               "name":"key",
               "description":"Name of the variable"
            }
         ],
         "parametersSignature":"(s)",
         "uid":120
      },
      "121":{
         "name":"getDataList",
         "returnDescription":"A list of all the data key names that contain the given string.",
         "returnSignature":"[s]",
         "description":"Gets a list of all key names that contain a given string",
         "parameters":[
            {
               "name":"filter",
               "description":"A string used as the search term"
            }
         ],
         "parametersSignature":"(s)",
         "uid":121
      },
      "122":{
         "name":"getDataListName",
         "returnDescription":"A list containing the keys in memory",
         "returnSignature":"[s]",
         "description":"Gets the key names for all the key-value pairs in memory",
         "parameters":[
            
         ],
         "parametersSignature":"()",
         "uid":122
      },
      "123":{
         "name":"getDataOnChange",
         "returnDescription":"an array containing all the retrieved data",
         "returnSignature":"m",
         "description":"DEPRECATED - Blocks the caller until the value of a key changes",
         "parameters":[
            {
               "name":"key",
               "description":"Name of the data."
            },
            {
               "name":"deprecatedParameter",
               "description":"DEPRECATED - this parameter has no effect"
            }
         ],
         "parametersSignature":"(si)",
         "uid":123
      },
      "124":{
         "name":"getDataPtr",
         "returnDescription":"A pointer converted to int",
         "returnSignature":"X",
         "description":"Gets a pointer to 32 a bit data item. Beware, the pointer will only be valid during the lifetime of the ALMemory object. Use with care, at initialization, not every loop. Insert a data item if needed. Throw if the data item has not the expected type. Only meaningful when called from code running in the same process as ALMemory.",
         "parameters":[
            {
               "name":"key",
               "description":"Name of the data."
            }
         ],
         "parametersSignature":"(s)",
         "uid":124
      },
      "125":{
         "name":"getIntPtr",
         "returnDescription":"A pointer to int",
         "returnSignature":"X",
         "description":"Gets a pointer to a int data item. Beware, the pointer will only be valid during the lifetime of the ALMemory object. Use with care, at initialization, not every loop. Insert a data item if needed. Throw if the data item has not the expected type. Only meaningful when called from code running in the same process as ALMemory.",
         "parameters":[
            {
               "name":"key",
               "description":"Name of the data."
            }
         ],
         "parametersSignature":"(s)",
         "uid":125
      },
      "126":{
         "name":"getFloatPtr",
         "returnDescription":"A pointer to float",
         "returnSignature":"X",
         "description":"Gets a pointer to a float data item. Beware, the pointer will only be valid during the lifetime of the ALMemory object. Use with care, at initialization, not every loop. Insert a data item if needed. Throw if the data item has not the expected type. Only meaningful when called from code running in the same process as ALMemory.",
         "parameters":[
            {
               "name":"key",
               "description":"Name of the data."
            }
         ],
         "parametersSignature":"(s)",
         "uid":126
      },
      "127":{
         "name":"getEventList",
         "returnDescription":"A list containing the names of all events",
         "returnSignature":"[s]",
         "description":"Gets a list containing the names of all the declared events",
         "parameters":[
            
         ],
         "parametersSignature":"()",
         "uid":127
      }
   },
   "description":"ALMemory provides a centralized memory that can be used to store and retrieve named values. It also acts as a hub for the distribution of event notifications.",
   "signals":{
      "86":{
         "name":"traceObject",
         "signature":"((IiIm(ll)<timeval,tv_sec,tv_usec>llII)<EventTrace,id,kind,slotId,arguments,timestamp,userUsTime,systemUsTime,callerContext,calleeContext>)",
         "uid":86
      }
   },
   "properties":{
      
   }
}

@ComanderKai77
Copy link
Author

I also tested Python 2.7 with qi 1.5.0 but it gives me the same error.

@nyibbang
Copy link
Member

I don't see the problem from the metaobject, so it's probably an error from the metaobject of the return value of subscriber.
I'm sorry there's not much I can do for you, as we lack debugging tools or logs in the library that would enable us to have more information. One thing you could try is to capture the TCP packets with Wireshark with our custom dissector and see what the meta object is and why it's causing the error directly from the packets.

@ComanderKai77
Copy link
Author

I've used Wireshark but it seems that the lib crashed before the network communication.

image

I've also tested the qi-js wrapper and that works.

Just to be clear: I used the qi.js lib from the robot ([ROBOT_IP]/libs/qi/2/qi.js) and libqi-python from pypy (all versions).
Is the libqi-python version also available directly from the robot or what is the "normal" way to get it?

pepper.zip

@nyibbang
Copy link
Member

nyibbang commented Sep 27, 2022

I'm sorry, I don't have access to a robot at the moment, even less a robot on v2.5.8. There should be a version of libqi-python somewhere in the /nao (or /aldebaran) directory, have you tried an import qi in the python interpreter of the robot ?

@nyibbang
Copy link
Member

You should take a look to our documentation about the Python SDK : https://developer.softbankrobotics.com/pepper-naoqi-25/naoqi-developer-guide/sdks/python-sdk/python-sdk-installation-guide.

You can download one with the correct version of libqi-python from the download page.

@ComanderKai77
Copy link
Author

Using libqi-python directly on the robot works fine. It is Python 2.7 but less annoying than using an extra JS environment to get the events.

Thank you for your quick and helpful responses.

@nyibbang
Copy link
Member

You're welcome ! good luck with your robotic developments !

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