1

I've been stuck on this problem for a while now and I've looked at all the posts possible and cannot fix it...

I don't use PyCharm - I use VSCode
How to include dependencies from venv directory when running pyinstaller for project built in Pycharm?
I have also looked at various different online posts but nothing I try works and youtube videos.
YouTube Video

Here are the images of my entire inputs for Auto-Py-To-Exe. Would prefer it to be a single file but that doesn't work and just stops at building PKG...

In the PATH section I have specified my path to the site-packages but it still trying to look at the main path at C:\\Main Storage\\_GitHub Repos\\Cued-Speech\\app\\eng_to_ipa\\resources.

Please someone help me understand the reason this is happening and what I can do to solve it. Many Thanks in Advance. enter image description hereenter image description here

Error Log

C:\Main Storage\_GitHub Repos\Cued-Speech\app>app.exe
Traceback (most recent call last):
  File "app.py", line 8, in <module>
    import eng_to_ipa
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "PyInstaller\loader\pyimod02_importers.py", line 499, in exec_module
  File "eng_to_ipa\__init__.py", line 1, in <module>
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "PyInstaller\loader\pyimod02_importers.py", line 499, in exec_module
  File "eng_to_ipa\transcribe.py", line 19, in <module>
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "PyInstaller\loader\pyimod02_importers.py", line 499, in exec_module
  File "eng_to_ipa\stress.py", line 4, in <module>
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "PyInstaller\loader\pyimod02_importers.py", line 499, in exec_module
  File "eng_to_ipa\syllables.py", line 13, in <module>
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Main Storage\\_GitHub Repos\\Cued-Speech\\app\\eng_to_ipa\\resources\\phones.json'
[7100] Failed to execute script 'app' due to unhandled exception!

Update

All modules have __init__.py.

I need the app to look at this relative path when turned into exe ./venv/lib/python3.8/site-packages, its currently looking at C:\\Main Storage\\_GitHub Repos\\Cued-Speech\\app\\eng_to_ipa\\resources\\phones.json which is my local path and inside the actual app folder it generated itself... instead of using the specified path with --path by auto-py-to-exe.

I have also tried giving --path a relative path but every single time the box kept turning red as soon as I remove C:/.

I have also realised that the python version used by the app is 3.8 not 3.10 so I changed my venv to match the version and that didn't change anything.

0 Answers0