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

Exception: unknown file c:\users\broth\appdata\local\temp\_mei138842\spectrum\data\DOLPHINS.wav #8457

Open
snowuyl opened this issue May 8, 2024 · 6 comments

Comments

@snowuyl
Copy link

snowuyl commented May 8, 2024

Description of the issue

pyinstaller can generate main.exe successfully. But main.exe failed to run with the following error message.
Exception: unknown file c:\users\broth\appdata\local\temp_mei138842\spectrum\data\DOLPHINS.wav

Context information (for bug reports)

Context information (for bug reports)

  • Output of pyinstaller --version: 6.6.0
  • Version of Python: 3.11.9
  • Platform: Windows 11
  • How you installed Python: Windows store

A minimal example program which shows the error

Please unzip [pyHrvTest.zip](https://github.com/pyinstaller/pyinstaller/files/15242915/pyHrvTest.zip) and run deploy.bat from command prompt to generate main.exe. And run main.exe.

Stacktrace / full error message

Traceback (most recent call last):
  File "main.py", line 2, in <module>
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "PyInstaller\loader\pyimod02_importers.py", line 419, in exec_module
  File "pyhrvtest\hr.py", line 1, in <module>
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "PyInstaller\loader\pyimod02_importers.py", line 419, in exec_module
  File "pyhrv\__init__.py", line 36, in <module>
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "PyInstaller\loader\pyimod02_importers.py", line 419, in exec_module
  File "pyhrv\hrv.py", line 47, in <module>
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "PyInstaller\loader\pyimod02_importers.py", line 419, in exec_module
  File "pyhrv\frequency_domain.py", line 46, in <module>
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "PyInstaller\loader\pyimod02_importers.py", line 419, in exec_module
  File "spectrum\__init__.py", line 28, in <module>
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "PyInstaller\loader\pyimod02_importers.py", line 419, in exec_module
  File "spectrum\datasets.py", line 148, in <module>
  File "spectrum\datasets.py", line 146, in spectrum_data
Exception: unknown file c:\users\broth\appdata\local\temp\_mei138842\spectrum\data\DOLPHINS.wav
@snowuyl snowuyl added the triage Please triage and relabel this issue label May 8, 2024
@snowuyl
Copy link
Author

snowuyl commented May 8, 2024

pyHrvTest.zip

@bwoodsend
Copy link
Member

--collect-data=spectrum?

@snowuyl
Copy link
Author

snowuyl commented May 12, 2024

Thanks for your reply! Do you mean I need to add this option when generating main.exe file?

@rokm
Copy link
Member

rokm commented May 12, 2024

Thanks for your reply! Do you mean I need to add this option when generating main.exe file?

Yes.

@rokm rokm removed the triage Please triage and relabel this issue label May 12, 2024
@snowuyl
Copy link
Author

snowuyl commented May 20, 2024

Thanks for your reply! I run the following command to generate main.exe. main.exe can be generated successfully but failed to run with the following error messages.
pyinstaller --onefile --noconsole --collect-data=spectrum main.py

Traceback (most recent call last):
File "main.py", line 2, in
File "", line 1176, in _find_and_load
File "", line 1147, in _find_and_load_unlocked
File "", line 690, in _load_unlocked
File "PyInstaller\loader\pyimod02_importers.py", line 419, in exec_module
File "pyhrvtest\hr.py", line 1, in
File "", line 1176, in _find_and_load
File "", line 1147, in _find_and_load_unlocked
File "", line 690, in load_unlocked
File "PyInstaller\loader\pyimod02_importers.py", line 419, in exec_module
File "pyhrv_init
.py", line 36, in
File "", line 1176, in _find_and_load
File "", line 1147, in _find_and_load_unlocked
File "", line 690, in _load_unlocked
File "PyInstaller\loader\pyimod02_importers.py", line 419, in exec_module
File "pyhrv\hrv.py", line 48, in
File "", line 1176, in _find_and_load
File "", line 1147, in _find_and_load_unlocked
File "", line 690, in _load_unlocked
File "PyInstaller\loader\pyimod02_importers.py", line 419, in exec_module
File "pyhrv\nonlinear.py", line 38, in
File "", line 1176, in _find_and_load
File "", line 1147, in find_and_load_unlocked
File "", line 690, in load_unlocked
File "PyInstaller\loader\pyimod02_importers.py", line 419, in exec_module
File "nolds_init
.py", line 4, in
File "", line 1176, in find_and_load
File "", line 1147, in find_and_load_unlocked
File "", line 690, in load_unlocked
File "PyInstaller\loader\pyimod02_importers.py", line 419, in exec_module
File "nolds\datasets.py", line 260, in
File "nolds\datasets.py", line 113, in load_brown72
File "pkg_resources_init
.py", line 1187, in resource_stream
File "pkg_resources_init
.py", line 1466, in get_resource_stream
File "pkg_resources_init.py", line 1469, in get_resource_string
File "pkg_resources_init.py", line 1640, in _get
File "PyInstaller\loader\pyimod02_importers.py", line 228, in get_data
FileNotFoundError: [Errno 2] No such file or directory: 'C:\Users\broth\AppData\Local\Temp\_MEI88242\nolds\datasets\brown72.npy'

@rokm
Copy link
Member

rokm commented May 20, 2024

It's the same kind of problem - you need to also collect data from nolds package. I.e., also add --collect-data=nolds.

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