Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

blabel gives error with pyinstaller #21

Closed
AntoineBricard opened this issue Aug 30, 2022 · 3 comments
Closed

blabel gives error with pyinstaller #21

AntoineBricard opened this issue Aug 30, 2022 · 3 comments

Comments

@AntoineBricard
Copy link

AntoineBricard commented Aug 30, 2022

Hi,
I'm developing a python script that print a sticker using blabel package. This script run under ubuntu 2022.
From the VSCode debug, I'm able to run the script and print stickers but when I try to make a single executable file using pyinstaller, launching the executable return the following error :
Traceback (most recent call last): File "python_script.py", line 20, in <module> File "<frozen importlib._bootstrap>", line 1007, in _find_and_load File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 680, in _load_unlocked File "PyInstaller/loader/pyimod03_importers.py", line 546, in exec_module File "blabel/__init__.py", line 5, in <module> File "<frozen importlib._bootstrap>", line 1007, in _find_and_load File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 680, in _load_unlocked File "PyInstaller/loader/pyimod03_importers.py", line 546, in exec_module File "blabel/blabel.py", line 5, in <module> File "<frozen importlib._bootstrap>", line 1007, in _find_and_load File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 680, in _load_unlocked File "PyInstaller/loader/pyimod03_importers.py", line 546, in exec_module File "weasyprint/__init__.py", line 336, in <module> File "<frozen importlib._bootstrap>", line 1007, in _find_and_load File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 680, in _load_unlocked File "PyInstaller/loader/pyimod03_importers.py", line 546, in exec_module File "weasyprint/css/__init__.py", line 25, in <module> File "<frozen importlib._bootstrap>", line 1007, in _find_and_load File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 680, in _load_unlocked File "PyInstaller/loader/pyimod03_importers.py", line 546, in exec_module File "weasyprint/css/computed_values.py", line 10, in <module> File "<frozen importlib._bootstrap>", line 1007, in _find_and_load File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 680, in _load_unlocked File "PyInstaller/loader/pyimod03_importers.py", line 546, in exec_module File "weasyprint/text/line_break.py", line 6, in <module> File "<frozen importlib._bootstrap>", line 1007, in _find_and_load File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 680, in _load_unlocked File "PyInstaller/loader/pyimod03_importers.py", line 546, in exec_module File "pyphen/__init__.py", line 33, in <module> FileNotFoundError: [Errno 2] No such file or directory: '/tmp/_MEIRsPxXu/pyphen/dictionaries' [55951] Failed to execute script 'python_script' due to unhandled exception!

But if I generate the executable without the import of blabel package inside the python_script.py, there is no error.
Is there a way to use pyinstaller and blabel without getting any error ?

Thanks in advance,
Antoine

@veghp
Copy link
Member

veghp commented Aug 31, 2022

Hi, unfortunately I'm not familiar with pyinstaller. This line No such file or directory: '/tmp/_MEIRsPxXu/pyphen/dictionaries' suggests that the issue is with pyinstaller or its installation / setup, so perhaps asking the authors would be a good way forward?

I had good experience using Docker for "packaging" dependencies, for example: https://github.com/Edinburgh-Genome-Foundry/EGF_Docker_Jupyter

@Zulko
Copy link
Member

Zulko commented Aug 31, 2022

Also worth mentioning that the dependency weasyprint appears several times in the error and so it could be an issue between pyinstaller and Weasyprint. Maybe the Weasyprint community will have some insights?

@AntoineBricard
Copy link
Author

Hi,
Thanks both for the reply, I will check with pyinstaller and weasyprint community.

Antoine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants