belangeo / pyo

Python DSP module
GNU Lesser General Public License v3.0
1.31k stars 131 forks source link

Pyo causes herokuapp to crash in Django Project #171

Closed kevindublin closed 3 years ago

kevindublin commented 4 years ago

So I'm trying to put up a demo of a django project on Heroku that runs fine locally and loads when I uninstall the package Pyo, but it throws an OSerror when I reinstall it (OSError at / Exception Value: /app/.pyo/3.6_64/libs/libasound-fb332ab3.so.2.0.0: cannot open shared object -- see below for full traceback). I've added a buildpack that installs the libasound and recommened packages, but I still get the error. What am I missing? I see the Linux wheel fix symlink (https://github.com/belangeo/pyo/blob/master/pyo/_linux_wheel_fix_symlinks.py). Is the issue here? Are there C dependencies? Any help greatly appreciated.

Error:

Request Method: GET Request URL: ---

Django Version: 3.0.3 Python Version: 3.6.10 Installed Applications: ['django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'django.contrib.sites', 'core', 'allauth', 'allauth.account', 'allauth.socialaccount', 'allauth.socialaccount.providers.facebook', 'allauth.socialaccount.providers.google'] Installed Middleware: ('whitenoise.middleware.WhiteNoiseMiddleware', 'django.middleware.security.SecurityMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware')

Traceback (most recent call last): File "/app/.heroku/python/lib/python3.6/site-packages/django/core/handlers/exception.py", line 34, in inner response = get_response(request) File "/app/.heroku/python/lib/python3.6/site-packages/django/core/handlers/base.py", line 100, in _get_response resolver_match = resolver.resolve(request.path_info) File "/app/.heroku/python/lib/python3.6/site-packages/django/urls/resolvers.py", line 544, in resolve for pattern in self.url_patterns: File "/app/.heroku/python/lib/python3.6/site-packages/django/utils/functional.py", line 48, in get res = instance.dict[self.name] = self.func(instance) File "/app/.heroku/python/lib/python3.6/site-packages/django/urls/resolvers.py", line 588, in url_patterns patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module) File "/app/.heroku/python/lib/python3.6/site-packages/django/utils/functional.py", line 48, in get res = instance.dict[self.name] = self.func(instance) File "/app/.heroku/python/lib/python3.6/site-packages/django/urls/resolvers.py", line 581, in urlconf_module return import_module(self.urlconf_name) File "/app/.heroku/python/lib/python3.6/importlib/init.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 994, in _gcd_import

File "", line 971, in _find_and_load

File "", line 955, in _find_and_load_unlocked

File "", line 665, in _load_unlocked

File "", line 678, in exec_module

File "", line 219, in _call_with_frames_removed

File "/app/autosubclub/urls.py", line 20, in from core import views File "/app/core/views.py", line 8, in from pyo import PVMix, PVMorph, PVAnal, SfPlayer, Vocoder, Server, Record, sndinfo File "/app/.heroku/python/lib/python3.6/site-packages/pyo/init.py", line 25, in from . import _linux_wheel_fix_symlinks File "/app/.heroku/python/lib/python3.6/site-packages/pyo/_linux_wheel_fix_symlinks.py", line 88, in libasound = ctypes.CDLL(libasound, mode=ctypes.RTLD_GLOBAL) File "/app/.heroku/python/lib/python3.6/ctypes/init.py", line 348, in init self._handle = _dlopen(self._name, mode)

Exception Type: OSError at / Exception Value: /app/.pyo/3.6_64/libs/libasound-fb332ab3.so.2.0.0: cannot open shared object file: No such file or directory

belangeo commented 3 years ago

Fixed in version 1.0.4.