Hi,
I've never really used mailing lists before, so hope this goes okay!
I'm quite new to web apps, but have got some working with mod_wsgi before.
my app uses peewee to connect to a postgres database. peewee seems to
import okay - but is throwing a peewee.ImproperlyConfigured exception
because it can't find pscopg2 (which is installed and is available under
python3.4 and python3.6 which is the system one)
I had trouble with a web app before, but solved it by adding the
site-packages directory for python3.6 to the sys.path - but this web app
didn't import anything outside of the standard library. It seems mod_wsgi
is compiled against python3.4
Any help much appreciated!
James
/var/log/apache2/error.log:
[Mon Aug 21 01:12:01.535334 2017] [mpm_prefork:notice] [pid 9445] AH00169:
caught SIGTERM, shutting down
[Mon Aug 21 01:12:02.676616 2017] [wsgi:warn] [pid 9519] mod_wsgi: Compiled
for Python/3.4.2rc1+.
[Mon Aug 21 01:12:02.676703 2017] [wsgi:warn] [pid 9519] mod_wsgi: Runtime
using Python/3.4.2.
[Mon Aug 21 01:12:02.706211 2017] [mpm_prefork:notice] [pid 9519] AH00163:
Apache/2.4.10 (Debian) mod_wsgi/4.3.0 Python/3.4.2 configured -- resuming
normal operations
[Mon Aug 21 01:12:02.706340 2017] [core:notice] [pid 9519] AH00094: Command
line: '/usr/sbin/apache2'
[Mon Aug 21 01:12:08.335352 2017] [wsgi:error] [pid 9523] [client 92.11.
1.190:59553] [2017-08-21 01:12:08,328] ERROR in app: Exception on / [GET]
[Mon Aug 21 01:12:08.335454 2017] [wsgi:error] [pid 9523] [client 92.11.
1.190:59553] Traceback (most recent call last):
[Mon Aug 21 01:12:08.335466 2017] [wsgi:error] [pid 9523] [client 92.11.
1.190:59553] File "/usr/local/lib/python3.6/site-packages/flask/app.py",
line 1982, in wsgi_app
[Mon Aug 21 01:12:08.335478 2017] [wsgi:error] [pid 9523] [client 92.11.
1.190:59553] response = self.full_dispatch_request()
[Mon Aug 21 01:12:08.335489 2017] [wsgi:error] [pid 9523] [client 92.11.
1.190:59553] File "/usr/local/lib/python3.6/site-packages/flask/app.py",
line 1614, in full_dispatch_request
[Mon Aug 21 01:12:08.335501 2017] [wsgi:error] [pid 9523] [client 92.11.
1.190:59553] rv = self.handle_user_exception(e)
[Mon Aug 21 01:12:08.335512 2017] [wsgi:error] [pid 9523] [client 92.11.
1.190:59553] File "/usr/local/lib/python3.6/site-packages/flask/app.py",
line 1517, in handle_user_exception
[Mon Aug 21 01:12:08.335524 2017] [wsgi:error] [pid 9523] [client 92.11.
1.190:59553] reraise(exc_type, exc_value, tb)
[Mon Aug 21 01:12:08.335575 2017] [wsgi:error] [pid 9523] [client 92.11.
1.190:59553] File
"/usr/local/lib/python3.6/site-packages/flask/_compat.py", line 33, in
reraise
[Mon Aug 21 01:12:08.335587 2017] [wsgi:error] [pid 9523] [client 92.11.
1.190:59553] raise value
[Mon Aug 21 01:12:08.335597 2017] [wsgi:error] [pid 9523] [client 92.11.
1.190:59553] File "/usr/local/lib/python3.6/site-packages/flask/app.py",
line 1610, in full_dispatch_request
[Mon Aug 21 01:12:08.335608 2017] [wsgi:error] [pid 9523] [client 92.11.
1.190:59553] rv = self.preprocess_request()
[Mon Aug 21 01:12:08.335619 2017] [wsgi:error] [pid 9523] [client 92.11.
1.190:59553] File "/usr/local/lib/python3.6/site-packages/flask/app.py",
line 1831, in preprocess_request
[Mon Aug 21 01:12:08.335630 2017] [wsgi:error] [pid 9523] [client 92.11.
1.190:59553] rv = func()
[Mon Aug 21 01:12:08.335641 2017] [wsgi:error] [pid 9523] [client 92.11.
1.190:59553] File "/srv/webapps/stackoverkill/stackoverkill.py", line 20,
in db_connect
[Mon Aug 21 01:12:08.335652 2017] [wsgi:error] [pid 9523] [client 92.11.
1.190:59553] db.get_conn()
[Mon Aug 21 01:12:08.335662 2017] [wsgi:error] [pid 9523] [client 92.11.
1.190:59553] File "/usr/local/lib/python3.6/site-packages/peewee.py",
line 3676, in get_conn
[Mon Aug 21 01:12:08.335673 2017] [wsgi:error] [pid 9523] [client 92.11.
1.190:59553] self.connect()
[Mon Aug 21 01:12:08.335684 2017] [wsgi:error] [pid 9523] [client 92.11.
1.190:59553] File "/usr/local/lib/python3.6/site-packages/peewee.py",
line 3653, in connect
[Mon Aug 21 01:12:08.335695 2017] [wsgi:error] [pid 9523] [client 92.11.
1.190:59553] self._local.conn = self._create_connection()
[Mon Aug 21 01:12:08.335706 2017] [wsgi:error] [pid 9523] [client 92.11.
1.190:59553] File "/usr/local/lib/python3.6/site-packages/peewee.py",
line 3681, in _create_connection
[Mon Aug 21 01:12:08.335716 2017] [wsgi:error] [pid 9523] [client 92.11.
1.190:59553] return self._connect(self.database, **self.connect_kwargs)
[Mon Aug 21 01:12:08.335727 2017] [wsgi:error] [pid 9523] [client 92.11.
1.190:59553] File "/usr/local/lib/python3.6/site-packages/peewee.py",
line 4072, in _connect
[Mon Aug 21 01:12:08.335738 2017] [wsgi:error] [pid 9523] [client 92.11.
1.190:59553] raise ImproperlyConfigured('psycopg2 must be installed.')
[Mon Aug 21 01:12:08.335755 2017] [wsgi:error] [pid 9523] [client 92.11.
1.190:59553] peewee.ImproperlyConfigured: psycopg2 must be installed.
[Mon Aug 21 01:12:08.335833 2017] [wsgi:error] [pid 9523] [client 92.11.
1.190:59553]
--
You received this message because you are subscribed to the Google Groups
"modwsgi" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.