Skip to content
New issue

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

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

Already on GitHub? # to your account

Sounddevice package cannot be found since Pyinstaller version 5.1 #432

Closed
ArekMC opened this issue May 18, 2022 · 1 comment · Fixed by #433
Closed

Sounddevice package cannot be found since Pyinstaller version 5.1 #432

ArekMC opened this issue May 18, 2022 · 1 comment · Fixed by #433
Labels
bug Something isn't working

Comments

@ArekMC
Copy link

ArekMC commented May 18, 2022

Description of the issue

Context information (for bug reports)

Describtion:

It is not possible to bundle 'sounddevice 0.4.4' since the pyinstaller version '5.1'.
It was working well with verson '5.0.1'. I tried it for both Python 3.9 and 3.10.
When I downgrade to Pyinstaller version 5.0.1 in the same env, it is working again.

File "...evn\lib\site-packages\PyInstaller\depend\imphook.py", line 361, in _load_hook_module
    self._hook_module = importlib_load_source(self.hook_module_name, self.hook_filename)
  File "...evn\rbook39\lib\site-packages\PyInstaller\compat.py", line 620, in importlib_load_source
    return mod_loader.load_module()
  File "<frozen importlib._bootstrap_external>", line 529, in _check_name_wrapper
  File "<frozen importlib._bootstrap_external>", line 1029, in load_module
  File "<frozen importlib._bootstrap_external>", line 854, in load_module
  File "<frozen importlib._bootstrap>", line 274, in _load_module_shim
  File "<frozen importlib._bootstrap>", line 711, in _load
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 850, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "...evn\lib\site-packages\_pyinstaller_hooks_contrib\hooks\stdhooks\hook-sounddevice.py", line 24, in <module>
    sfp = get_package_paths("sounddevice")
  File "...evn\lib\site-packages\PyInstaller\utils\hooks\__init__.py", line 582, in get_package_paths    
    raise ValueError(f"Package '{package}' does not exist or is not a package!")
ValueError: Package 'sounddevice' does not exist or is not a package!
@ArekMC ArekMC added the triage label May 18, 2022
@ArekMC ArekMC changed the title Cannot install sounddevice package since Pyinstaller version 5.1 Cannot bundle sounddevice package since Pyinstaller version 5.1 May 18, 2022
@ArekMC ArekMC changed the title Cannot bundle sounddevice package since Pyinstaller version 5.1 Sounddevice package cannot be found since Pyinstaller version 5.1 May 18, 2022
@rokm
Copy link
Member

rokm commented May 18, 2022

Transferring to pyinstaller-hooks-utils because it is the hook that needs to be updated. sounddevice is indeed not a package (and has never been), so it should be using get_module_file_attribute instead. (And it breaks now because 5.1 changed the behavior of get_package_paths).

@rokm rokm transferred this issue from pyinstaller/pyinstaller May 18, 2022
@rokm rokm added bug Something isn't working and removed triage labels May 18, 2022
@rokm rokm closed this as completed in #433 May 19, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants