-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Description
Hi I'm getting a Failed to load module: No module named google.protobuf.internal
error when trying to load the droneapi module in mavproxy.
I did have the droneapi working but because I installed as root it put the .mavinit.scr file in /home/root. I since set up a user account. I then uninstalled the droneapi package then reinstalled from px4 login with sudo. Now the droneapi isn't working and giving the above mentioned error.
Obviously the uninstall / install has messed it up somehow but can't see where. The output at the bottom shows there is multiple instances of the api.py file. Maybe the path to the correct location is missing?
Any ideas how to fix this?
Below is the traceback when trying to load droneapi in mavproxy.
GUIDED> Traceback (most recent call last):
File "/usr/local/bin/mavproxy.py", line 260, in load_module
m = import_package(modpath)
File "/usr/local/bin/mavproxy.py", line 390, in import_package
mod = __import__(name)
ImportError: No module named mavproxy_droneapi.module.api
Traceback (most recent call last):
File "/usr/local/bin/mavproxy.py", line 260, in load_module
m = import_package(modpath)
File "/usr/local/bin/mavproxy.py", line 390, in import_package
mod = __import__(name)
File "/usr/local/lib/python2.7/dist-packages/droneapi/module/api.py", line 8, in <module>
from droneapi.lib.WebClient import *
File "/usr/local/lib/python2.7/dist-packages/droneapi/lib/WebClient.py", line 1, in <module>
from webapi_pb2 import *
File "/usr/local/lib/python2.7/dist-packages/droneapi/lib/webapi_pb2.py", line 4, in <module>
from google.protobuf.internal import enum_type_wrapper
ImportError: No module named google.protobuf.internal
Failed to load module: No module named google.protobuf.internal. Use 'set moddebug 3' in the MAVProxy console to enable traceback
Below is output to show where the api.py file is located, in many locations:
px4@ubilinux:~$ sudo find / -iname *api.py*
/usr/share/pyshared/numpy/core/generate_numpy_api.py
/usr/share/pyshared/numpy/core/tests/test_api.py
/usr/lib/pymodules/python2.6/numpy/core/generate_numpy_api.py
/usr/lib/pymodules/python2.6/numpy/core/generate_numpy_api.pyc
/usr/lib/pymodules/python2.6/numpy/core/tests/test_api.py
/usr/lib/pymodules/python2.6/numpy/core/tests/test_api.pyc
/usr/lib/pymodules/python2.7/numpy/core/generate_numpy_api.py
/usr/lib/pymodules/python2.7/numpy/core/generate_numpy_api.pyc
/usr/lib/pymodules/python2.7/numpy/core/tests/test_api.py
/usr/lib/pymodules/python2.7/numpy/core/tests/test_api.pyc
/usr/local/lib/python2.7/dist-packages/requests-2.7.0-py2.7.egg/requests/api.pyc
/usr/local/lib/python2.7/dist-packages/requests-2.7.0-py2.7.egg/requests/api.py
/usr/local/lib/python2.7/dist-packages/pymavlink/generator/lib/genxmlif/xmlifApi.py
/usr/local/lib/python2.7/dist-packages/pymavlink/generator/lib/genxmlif/xmlifApi.pyc
/usr/local/lib/python2.7/dist-packages/droneapi/module/api.pyc
/usr/local/lib/python2.7/dist-packages/droneapi/module/api.py
/root/droneapi-python/droneapi/module/api.py
/root/build/pymavlink/build/lib.linux-i686-2.7/pymavlink/generator/lib/genxmlif/xmlifApi.py
/root/build/pymavlink/generator/lib/genxmlif/xmlifApi.py
/root/build/droneapi/build/lib.linux-i686-2.7/droneapi/module/api.py
/root/build/droneapi/droneapi/module/api.py
/home/px4/build/droneapi/droneapi/module/api.py
/home/px4/build/droneapi/build/lib.linux-i686-2.7/droneapi/module/api.py