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

Problems of loading opus library #97

Open
CyberRex0 opened this issue Jun 8, 2022 · 0 comments
Open

Problems of loading opus library #97

CyberRex0 opened this issue Jun 8, 2022 · 0 comments

Comments

@CyberRex0
Copy link

There seems to be a problem with library_loader.py, which loads the Opus library.

In lines 104 to 105 of library_loader.py, it seems that a path is added to expand the library search range, but this prevents the globally installed Opus library from being loaded in some environments.

This is the REPL when we confirmed that the process of extending the search range was causing the problem:

>>> import ctypes.util
>>> ctypes.util.find_library('opus')
'libopus.so'
>>> import pyogg
>>> pyogg.OpusEncoder()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/pyogg/__init__.py", line 74, in __init__
    raise PyOggError("The Opus library wasn't found or couldn't be loaded (maybe you're trying to use 64bit libraries with 32bit Python?)")
pyogg.pyogg_error.PyOggError: The Opus library wasn't found or couldn't be loaded (maybe you're trying to use 64bit libraries with 32bit Python?)
>>> ctypes.util.find_library('opus')
>>>

Commenting out lines 104 and 105 eliminated this problem.

Additional Information

  • Termux on Android 11
  • libopus installed
  • libopusfile installed
  • libopusenc installed
  • PyOgg 0.7 (using latest github commit)
  • Python 3.10
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

1 participant