Bug Report
-
At what date and time did you most recently experience the problem?
2022-12-22T15:52:45.994388013Z
-
Where did you experience the problem? E.g. Azure Web Apps, Azure Functions, Azure Container Registry, or offline use.
Azure Web Apps
-
If your repo is publicly available please share its URL:
Private 🚫
-
What happened?
ModuleNotFoundError: No module named 'psycopg2._psycopg'
-
What did you expect or want to happen?
Successful loading of the Web App
-
How can we reproduce it?
🤷♂️
-
Do you have log output? Please include between the backticks:
_____
/ _ \ __________ _________ ____
/ /_\ \\___ / | \_ __ \_/ __ \
/ | \/ /| | /| | \/\ ___/
\____|__ /_____ \____/ |__| \___ >
\/ \/ \/
A P P S E R V I C E O N L I N U X
Documentation: http://aka.ms/webapp-linux
Python 3.11.0
Note: Any data outside '/home' is not persisted
Starting OpenBSD Secure Shell server: sshd.
App Command Line not configured, will attempt auto-detect
Starting periodic command scheduler: cron.
Launching oryx with: create-script -appPath /home/site/wwwroot -output /opt/startup/startup.sh -virtualEnvName antenv -defaultApp /opt/defaultsite
Found build manifest file at '/home/site/wwwroot/oryx-manifest.toml'. Deserializing it...
Build Operation ID: |yXcV3nEsHeE=.fbb67f3_
Oryx Version: 0.2.20221031.3, Commit: 2b19efca9729673fc259e6a817be3cc0bb73b9d5, ReleaseTagName: 20221031.3
Output is compressed. Extracting it...
Extracting '/home/site/wwwroot/output.tar.gz' to directory '/tmp/8dae428d1852d04'...
App path is set to '/tmp/8dae428d1852d04'
Detected an app based on Django
Generating `gunicorn` command for 'core.wsgi'
Writing output script to '/opt/startup/startup.sh'
Using packages from virtual environment antenv located at /tmp/8dae428d1852d04/antenv.
Updated PYTHONPATH to '/opt/startup/app_logs:/tmp/8dae428d1852d04/antenv/lib/python3.11/site-packages'
[80] [INFO] Starting gunicorn 20.1.0
[80] [INFO] Listening at: http://0.0.0.0:8000 (80)
[80] [INFO] Using worker: sync
[83] [INFO] Booting worker with pid: 83
[80] [CRITICAL] WORKER TIMEOUT (pid:83)
[80] [WARNING] Worker with pid 83 was terminated due to signal 9
[95] [INFO] Booting worker with pid: 95
[95] [ERROR] Exception in worker process
Traceback (most recent call last):
File "/usr/local/lib/python3.9/dist-packages/gunicorn/arbiter.py", line 589, in spawn_worker
worker.init_process()
File "/usr/local/lib/python3.9/dist-packages/gunicorn/workers/base.py", line 134, in init_process
self.load_wsgi()
File "/usr/local/lib/python3.9/dist-packages/gunicorn/workers/base.py", line 146, in load_wsgi
self.wsgi = self.app.wsgi()
File "/usr/local/lib/python3.9/dist-packages/gunicorn/app/base.py", line 67, in wsgi
self.callable = self.load()
File "/usr/local/lib/python3.9/dist-packages/gunicorn/app/wsgiapp.py", line 58, in load
return self.load_wsgiapp()
File "/usr/local/lib/python3.9/dist-packages/gunicorn/app/wsgiapp.py", line 48, in load_wsgiapp
return util.import_app(self.app_uri)
File "/usr/local/lib/python3.9/dist-packages/gunicorn/util.py", line 359, in import_app
mod = importlib.import_module(module)
File "/usr/lib/python3.9/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 790, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "/tmp/8dae428d1852d04/core/wsgi.py", line 16, in <module>
application = get_wsgi_application()
File "/tmp/8dae428d1852d04/antenv/lib/python3.11/site-packages/django/core/wsgi.py", line 12, in get_wsgi_application
django.setup(set_prefix=False)
File "/tmp/8dae428d1852d04/antenv/lib/python3.11/site-packages/django/__init__.py", line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File "/tmp/8dae428d1852d04/antenv/lib/python3.11/site-packages/django/apps/registry.py", line 91, in populate
app_config = AppConfig.create(entry)
File "/tmp/8dae428d1852d04/antenv/lib/python3.11/site-packages/django/apps/config.py", line 123, in create
mod = import_module(mod_path)
File "/usr/lib/python3.9/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 790, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "/tmp/8dae428d1852d04/antenv/lib/python3.11/site-packages/django/contrib/postgres/apps.py", line 1, in <module>
from psycopg2.extras import DateRange, DateTimeRange, DateTimeTZRange, NumericRange
File "/tmp/8dae428d1852d04/antenv/lib/python3.11/site-packages/psycopg2/__init__.py", line 51, in <module>
from psycopg2._psycopg import ( # noqa
ModuleNotFoundError: No module named 'psycopg2._psycopg'
[95] [INFO] Worker exiting (pid: 95)
[80] [INFO] Shutting down: Master
[80] [INFO] Reason: Worker failed to boot.
Please complete the following information
- OS: Oryx 0.2.20220825.1, gunicorn 20.1.0
- Psycopg version: 2.9.5 psycopg2_binary-2.9.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Python version: 3.11.0
- PostgreSQL version: 13.8
- pip version: 22.3
See also