Hi, I've just realized that my django application is not using my virtualenv, but the outer python environment!
Inside "myvirtualenv" I have python3.4 and Django1.7.1 (and everything works fine when I activate it in a bash shell), but when any error appear while I'm visiting a web page I get the following (not to say that these errors are probably due to the wrong virtualenv):
KeyError at /user/list/
Request Method: GET
Request URL: http://sirion.pythonanywhere.com/user/list/?reload=1
Django Version: 1.6.6
Exception Type: KeyError
Exception Value: ...
Python Executable: /usr/local/bin/uwsgi
Python Version: 3.3.6
Python Path:
['/home/Sirion/.virtualenvs/myvirtualenv/lib/python3.3/site-packages',
'/var/www',
'.',
'',
'/home/Sirion/.local/lib/python3.3/site-packages',
'/usr/local/lib/python3.3/dist-packages/setuptools-7.0-py3.3.egg',
'/usr/local/lib/python3.3/dist-packages/matplotlib-1.3.1-py3.3-linux-x86_64.egg',
'/usr/local/lib/python3.3/dist-packages/certifi-14.05.14-py3.3.egg',
'/var/www',
'/usr/lib/python3.3',
'/usr/lib/python3.3/plat-x86_64-linux-gnu',
'/usr/lib/python3.3/lib-dynload',
'/usr/local/lib/python3.3/dist-packages',
'/usr/lib/python3/dist-packages',
'/home/Sirion/defeatme']
Server time: Wed, 28 Jan 2015 10:46:59 +0000
The path '/home/Sirion/.virtualenvs/myvirtualenv/lib/python3.3/site-packages' does not even exists on server!
In my wsgy.py I have:
activate_this = '/home/Sirion/.virtualenvs/myvirtualenv/bin/activate_this.py'
with open(activate_this) as f:
code = compile(f.read(), activate_this, 'exec')
exec(code, dict(__file__=activate_this))
Moreover, I do not find any error or warning in error.log file. Is there something I'm missing?