.pyc file import errors

D

dejmail

hi everyone

I have a Flask app (in virtualenv, installed with --no-site-packages) running on Apache 2.4 with mod_wsgi, python2.7.

When I leave it up to Apache to activate the Virtualenv, and I perform the URL request, I start getting alot of errors in the logs. It seems to want to create .pyc files in the /usr/lib/python2.7 directory, but can't for somereason (probably permissions). I don't know why it would want to do this. The program still returns "Hello World" as it should though. Peculiarly, this doesn't occur on every repeat of the same URL request.

Here are some examples of the output in http://bpaste.net/show/176199/

As the output on bpaste shows, for the packages or files it tries to importfrom the virtualenv directories, I don't see these errors. It only has a problem with those it tries to access in the system python directory.

Is this normal ? I would think Apache has activated the virtualenv just fine if it is returning the output as it should, but I don't understand the presence of all the log errors. Perhaps they are just warnings I can ignore. I have unset the default $PYTHON_PATH, and a Django app on the same system does not have these problems.

Any ideas, because I'm out of them.

many thanks

Liam
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top