Python SDK - Troubleshooting ¶
Here are a few error message you could get, and a possible solution.
Import error ¶
ImportError: No module named naoqi
You must have something wrong with your
You can check this by typing:
import sys print "\n".join(sys.path)
You should see
beginning of the list.
ImportError: ./_inaoqi.so: wrong ELF class: ELFCLASS32
You are using a 64 bits version of python.
ImportError: libpython2.6.so.1.0: cannot open shared object file: No such file or directory
You are using a Python2.7 with the python2.6 version of the Python SDK.
Version mismatch ¶
Your version of Python does not match the one with which the Python SDK was made.
, make sure
(While 1.10 needed this parameter ON, release 1.12 needs this parameter to be OFF)
Fatal Python error: PyThreadState_Get: no current thread ¶
You are using a version of Python that is not binary compatible with the one used to compile the Python bindings.
Make sure you are using Python coming from
. (It usually is in
Errors with ALProxy ¶
RuntimeError: ALBrokerProxy::getBrokerInfo can not get broker info. Endpoint : http://nao.local:9559
Make sure NAOqi is running and the IP you used in
constructor is correct
RuntimeError: ALNetwork::getModuleByName failed to get module MyModule http://nao.local:9559
Make sure you spelt the name of the module correctly.
File "naoqi.py", line 246, in method_missing raise e RuntimeError: ALTextToSpeech::sa ALBroker::methodCall: method: sa, params: ["hello"] ALTextToSpeech::sa Function sa does not exist in module ALTextToSpeech
Make sure you spelt the name of the function correctly.
To check the complete list of modules and method names, see section NAOqi APIs
Weird float errors ¶
If you notice that floats are trucated when they are the result of the call of a bound methods, make sure that your locale is in english.
You can set LC_NUMERIC=’C’ for this
import locale locale.setlocale(locale.LC_NUMERIC, 'C')