FileNotFoundError grapheme_break_property.json when built as executable with PyInstaller
See original GitHub issueHello,
I am shipping executables with PyInstaller. Even though I’ve enabled hidden import
for alive-progress
/alive_progress
,
The executable throws the following error during runtime.
File "PyInstaller/loader/pyimod03_importers.py", line 476, in exec_module
File "alive_progress/styles/exhibit.py", line 9, 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 476, in exec_module
File "alive_progress/styles/internal.py", line 144, in <module>
File "alive_progress/styles/internal.py", line 22, in __create_spinners
File "alive_progress/animations/spinners.py", line 43, in frame_spinner_factory
File "alive_progress/animations/spinners.py", line 43, in <genexpr>
File "alive_progress/animations/spinners.py", line 43, in <genexpr>
File "alive_progress/utils/cells.py", line 144, in to_cells
File "alive_progress/utils/cells.py", line 148, in split_graphemes
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 476, in exec_module
File "grapheme/__init__.py", line 9, 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 476, in exec_module
File "grapheme/api.py", line 2, 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 476, in exec_module
File "grapheme/finder.py", line 3, 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 476, in exec_module
File "grapheme/grapheme_property_group.py", line 97, in <module>
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/_MEIr3FD7j/grapheme/data/grapheme_break_property.json'
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:15 (7 by maintainers)
Top Results From Across the Web
python PyInstaller created executable failed to run the exe Error
json "resources" is the package where from you have to take the data file. Now run the following in command window from your...
Read more >using pyinstaller when importing pygsheets #490 - GitHub
I'm trying to create an exe file to distribute among users in my company. ... Key (json file) to the 'dist' folder created...
Read more >Python exe cannot find "default-schema.json"
Hi Everyone, I have been trying to package a script in dash using pyinstaller. The dash app is supposed to plot a plotly...
Read more >Bokeh 2.0.0 and PyInstaller - Community Support
I am unable to successfully create a pyinstaller executable with bokeh==2.0.0, I get the following error: FileNotFoundError: [Errno 2] No ...
Read more >how to include json in executable file by pyinstaller - splunktool
Use the spec file that is made when you first run pyinstaller on a py script. From there you can add json and...
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
CLI Just add grapheme data like
pyinstaller -F "Hello World.py" --collect-all grapheme
U have to run this
pyi-makespec --onefile start.py
in terminal with ur main.py file. After that, put that line in the spec file aftera block code
:a.datas += Tree("<python_path>/Lib/site-packages/grapheme/", prefix= "grapheme")
a.datas += Tree("<python_path>/lib/site-packages/about-time/", prefix= "about-time")
Like that:
Then, run
pyinstaller spec file
and that’s it!