PyiFrozenImporter cannot handle module

705 views
Skip to first unread message

Anja

unread,
Sep 25, 2023, 6:49:30 AM9/25/23
to PyInstaller
Hello Everyone,
I'm trying to package a bit of a bigger project with Pyinstaller (single folder is around 185MB).
Converting my project to a single folder works without any problems. However, when I try to start this program, it throws the error:

Traceback (most recent call last):

  File "my_script.py", line 6, in <module>

  File "PyInstaller\loader\pyimod02_importers.py", line 385, in exec_module

  File "my_script_2", line 24, in <module>

  File "PyInstaller\loader\pyimod02_importers.py", line 385, in exec_module

  File "compound_split\char_split.py", line 10, in <module>

  File "PyInstaller\loader\pyimod02_importers.py", line 366, in exec_module

  File "PyInstaller\loader\pyimod02_importers.py", line 161, in get_code

ImportError: PyiFrozenImporter cannot handle module 'compound_split.de_ngram_probs'

[4956] Failed to execute script 'my_script' due to unhandled exception! 


I tried to import this module via hidden imports and tried to use the debug function to gain more information. Everything leads to the same result. Unfortunately, I cannot find anything to this error....

Can someone help me solve this?


bwoodsend

unread,
Sep 27, 2023, 2:48:27 AM9/27/23
to PyInstaller

I can’t get the issue to occur using the latest PyInstaller and compound_split. Line 10 of compound_split\char_split.py is import compound_split.char_split so running pyinstaller on a script containing just that line should be enough to trigger the error. Can you confirm if that is the case for you?

Anja

unread,
Oct 2, 2023, 8:54:19 AM10/2/23
to PyInstaller
I tried that before, and then it worked fine. 
Since then, I reinstalled Pyinstaller and am now using it through 'python -m PyInstaller'. Since then I did not have that same error again.
Thanks for your help!
Reply all
Reply to author
Forward
0 new messages