muccc / iridium-toolkit

A set of tools to parse Iridium frames
477 stars 111 forks source link

Reassembler.py Module Not Found Error #83

Closed muaddib1984 closed 2 years ago

muaddib1984 commented 2 years ago

I just cloned the latest version of iridium-toolkit and reassembler.py errors

Traceback (most recent call last):
  File "/home/user/iridium-toolkit/reassembler.py", line 12, in <module>
    import iridium.config
ModuleNotFoundError: No module named 'iridium.config'

I haven't had this issue before, but i don't think i've used the newest version since the iridium.config option was added. I'm using python 3.9.5

Sec42 commented 2 years ago

I can not reproduce this error.

Can you try with a fresh clone?

muaddib1984 commented 2 years ago

i just tried with a fresh clone. same issue. it seems that the implicit namespace for iridium/config is not being picked up. I get that this is more of a python issue, but its a new install of ubuntu 21, i have gr-iridium and GNURadio installed. the extractor and parser work fine. Do you have your PYTHONPATH set in .bashrc?

muaddib1984 commented 2 years ago

ok, i got the issue to stop by uninstalling gr-iridium. it appears there's a namespace conflict when installing gr-iridium system-wide. I think you guys recommend (and i assume use) PyBOMBS, so maybe that's the issue for me since I'm installing GNURadio and gr-iridium system-wide, so when python tries to import iridium.config, it finds gr-iridium's namespace instead of the iridium-toolkit module iridium-toolkit/iridium/config.py for a proposed fix, maybe changing the module under iridium-toolkit to something other than iridium might work? I changed the directory name to Iridium and had to change the instances of iridium.blahblah to Iridium.blahblah in iridium-toollkit/reassembler.py which worked on my system.

Sec42 commented 2 years ago

Thanks for finding the cause. That's unfortunate. I would have thought that the local directory had precedence over system files. Ah well, I'll probably have to rename the thing.

schneider42 commented 2 years ago

With Ubuntu 22.04 we will have more situations where gr-iridium is installed system wide.

alphafox02 commented 2 years ago

I had to revert to f1be9e5 on DragonOS Focal (20.04) to make it work again, of course it’s using GR 3.8 branch on the desktop build. I had just uploaded a new image and did a last minute pull on the toolkit (forgot to check it).

muaddib1984 commented 2 years ago

@alphafox02 if you follow my instructions above it will work fine. Just change the directory and do a find/replace on the references.

Sec42 commented 2 years ago

@muaddib1984 / @alphafox02 this issue should be fixed by the above commit. Let me know if it doesn't work for you.

alphafox02 commented 2 years ago

Switched to master and did a pull, works perfectly fine now. Thank you! I’ll change that to the default again in the next iso.

muaddib1984 commented 2 years ago

Cool. I'll try it later today. Thanks @schneider42 and @Sec42 !