ImportError: No module named decoders
See original GitHub issueSince last big commit moving protocol files into versions, I can’t use it programmatically anymore. I tried using the pip module as well.
I tried sc2_cli.py and it works no problem but however when I do the basic example in the tutorial documentation
import mpyq
# Using mpyq, load the replay file.
archive = mpyq.MPQArchive('test.SC2Replay')
contents = archive.header['user_data_header']['content']
# Now parse the header information.
from s2protocol import versions
header = versions.latest().decode_replay_header(contents)
Full trace
$ python tester.py
Traceback (most recent call last):
File "tester.py", line 15, in <module>
header = versions.latest().decode_replay_header(contents)
File "/Users/Florian/gitworkspace/s2protocol/s2protocol/versions/__init__.py", line 62, in latest
return _import_protocol(base_path, module_name)
File "/Users/Florian/gitworkspace/s2protocol/s2protocol/versions/__init__.py", line 27, in _import_protocol
return imp.load_module(protocol_module_name, fp, pathname, description)
File "/Users/Florian/gitworkspace/s2protocol/s2protocol/versions/protocol58400.py", line 21, in <module>
from decoders import *
ImportError: No module named decoders
I tried putting from s2protocol.decoders import *
instead of from decoders import *
and I didn’t get the error so probably something you’d want to modify in the autogeneration
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
1684 – ImportError: No module named '_ctypes'
Bug 1684 - ImportError: No module named '_ctypes' ... srd: ImportError: Failed to load decoder ir_irmp: import by name failed: No module ...
Read more >Python import Error: from .decoder import JSONDecoder ...
I have a python module (getActiveLocation.py). It basically makes a http POST call, processes its response and returns it. It makes use of...
Read more >Re: [sigrok-devel] Nightly PulseView AppImage on Ubuntu ...
Re: [sigrok-devel] Nightly PulseView AppImage on Ubuntu starts but shows a python traceback: No module named _ctypes.
Read more >ImportError: No module named pyasn1.codec.der? [SOLVED]
I ran python script on my windows and I got this error below ,how can I fix it? I'm using python 2.7.3 from...
Read more >Fix: ImportError No Module Named in Python
As you can see in the above line of code, we are trying to import scrapy library, but it is giving us the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yeah this is a known issue that I’m very close to sorting out. It has to do with how the autogen modules import the core decoders. I tried putting work arounds in the python loading code but I haven’t gotten that to work satisfactorily. I’ve redone the auto-code gen (versions/protocolxxxxx.py) which should be rolling out over the next day or two.
Merged in #61 😃