pymavlink icon indicating copy to clipboard operation
pymavlink copied to clipboard

Lua/Wireshark: No module named 'pymavlink.tools'

Open guglie opened this issue 6 years ago • 5 comments

I'm trying to generate a Lua dissector for Wireshark.

Following the instructions on https://github.com/ArduPilot/pymavlink/blob/c18db673f0214b683bc330587bc11ce2818a8e8d/generator/mavgen_wlua.py#L9

I get this error ModuleNotFoundError: No module named 'pymavlink.tools'

I know that a partial solution could be the one proposed at https://github.com/ArduPilot/pymavlink/issues/133 but how can I solve this issue?

guglie avatar Jan 30 '19 17:01 guglie

I made it work using the path to the mavgen module, but it feels like a workaround not the right solution...

E.g. (from the mavlink folder) python pymavlink/tools/mavgen.py --lang=WLua message_definitions/v1.0/common.xml -o /Applications/Wireshark.app//Contents/PlugIns/wireshark/mavlink.lua

(The output folder here is the Wireshark plugin folder for Mac OSX)

guglie avatar Feb 06 '19 15:02 guglie

Hi, it looks like the pymavlink package is not in the PYTHONPATH. How did you install the pymavlink module? Are you in a virtual environment? Which version of Python are you using?

pietrodn avatar Feb 21 '19 08:02 pietrodn

I have this same issue. It happens whether I install via pip (both for python2 and python3) as well as using either the python2-pymavlink-git or the python-pymavlink-git packages in Archlinux's AUR (the latter I created recently).

In all 4 cases, there exists nothing in site-packages/pymavlink/tools

$ ls -lahd /usr/lib/python*/site-packages/pymavlink/tools
ls: cannot access '/usr/lib/python*/site-packages/pymavlink/tools': No such file or directory

Edit all 4 installation methods put mavgen.py in /usr/bin/. It can be run as mavgen.py --lang=WLua ....... It seems like the comment on line 9 of mavgen_wlua.py is wrong or misleading.

bobpaul avatar Sep 13 '19 01:09 bobpaul

I have the same issue. I'm using conda and I've installed pymavlink 2.4.37 via pip install.

vogt31337 avatar Mar 09 '23 12:03 vogt31337

I just found out, that in the site-package folder (where pip installed the pymavlink package), the tools subfolder is missing. Seems during installation the subfolder tools went missing. But the pypi.org package contains the tools subfolder...

vogt31337 avatar Mar 09 '23 12:03 vogt31337