JohnDMcMaster / usbrply

Replay USB messages from Wireshark (.cap) files

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

No module named usbrply.parsers

LamnaTheShark opened this issue · comments

Hi, I've been struggling with making all of this work for a few days.

Been launching setup.py to build & install.
Then when launching with a pcapng file, got this error on line 4, when importing :

ImportError : no module named usbrply.parsers

But the parser python file is present in the folder, did I builded something wrong ?

When launching directly from the usbrply.py file, after adding the usbrply to the path, I get the 'Cannot import name sockaddr_in' error.

Maybe this is evident for python coders, but for example, the main.py script should be renamed usbrply.py, I've also been struggling with this for a few minutes before understanding it had to be renamed. (this also crash the pip install)

Oh sorry looks like I missed this... Anyway it looks like setup.py was broken. Can you retry?

Hello,
I just tried this with the latest commit from 11 hours ago (1e60c33) and setup.py runs fine and installs but I also get the "ImportError: No module named usbrply.parsers" error when I try and run. The full trace is:

usbrply --device-hi -p test.pcapng >replay.py Traceback (most recent call last): File "/usr/local/bin/usbrply", line 4, in <module> __import__('pkg_resources').run_script('usbrply==1.0.0', 'usbrply') File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 666, in run_script self.require(requires)[0].run_script(script_name, ns) File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 1469, in run_script exec(script_code, namespace, namespace) File "/usr/local/lib/python2.7/dist-packages/usbrply-1.0.0-py2.7.egg/EGG-INFO/scripts/usbrply", line 4, in <module> __import__('pkg_resources').run_script('usbrply==1.0.0', 'usbrply') ImportError: No module named usbrply.parsers

@leohearts I understand that you probably didn't mean it, but just pointing out to the fact that your question could be interpreted as pretty rude to the author of this library, as it has an implicit expectation that he owes you a fix.

@krasin Sorry, i just mean i met the same problem, nothing more.
I'm not good at using English, and i don't know the emotion in texts, sorry for that.

No worries, I am not good at English too. :)

While I am not the author of the library, I will try to reproduce this issue to see if there's an obvious fix.

Heyo,
I've been a bit busy with work recently, but I actually have a bit of a break right now. I just took a quick look and its a regression from when I moved to a library (ie the library isn't being added to the dist). I'll try to have a patch soon

@leohearts can you please test if my proposed fix addresses your issue? It would be nice to hear, if it works for you.

@krasin It works now! Thank you!

@leohearts you're welcome! I am glad it worked.