.pyc file import errors

Discussion in 'Python' started by dejmail@gmail.com, Feb 8, 2014.

  1. Guest

    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
    , Feb 8, 2014
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mark Goldin

    Errors, errors, errors

    Mark Goldin, Jan 17, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    915
    Mark Goldin
    Jan 17, 2004
  2. Paul Opal
    Replies:
    12
    Views:
    924
    Paul Opal
    Oct 11, 2004
  3. Leo Yee

    pyc file problem

    Leo Yee, Jan 30, 2004, in forum: Python
    Replies:
    2
    Views:
    364
  4. Baz Walter
    Replies:
    4
    Views:
    517
  5. Roy Smith
    Replies:
    19
    Views:
    563
    Brian
    Feb 12, 2012
Loading...

Share This Page