asked 2011-02-10 20:20:56 -0500allanw
I'm in the process of setting up Askbot under Apache/mod_wsgi.
I cloned the Askbot repo into my virtualenv, then ran the startforum command and specified a project name. I can run the following command: bin/python <project_name>/manage.py shell and then do 'import keyedcache' and it works fine.
However, when I try and access the site, I'm seeing the following error in the logs:
ImproperlyConfigured: Error importing middleware askbot.middleware.anon_user: "No module named keyedcache"
Anyone got any suggestions?
answered 2011-02-11 11:43:42 -0500allanw
Okay, this problem is now solved. I simply added the required site-packages directory to my PYTHONPATH.
Assuming that you have cloned the repository to get the code...
Did you run
python setup.py develop? It should install all the dependencies and keep askbot app in the current directory.
There are several of dependencies - all listed in setup.py, except one - 'postgresql_psycopg2' - they can be installed manually too, but normally that should not be necessary.
answered 2011-02-11 07:35:59 -0500allanw
Yes, I ran
python setup.py develop. I'm starting to think that it might be a path issue, because if I add a logging statement to the django.wsgi file and output the contents of
sys.path, I can see that it contains paths such as /usr/lib/python2.5/site-packages/Django-1.1-py2.5.egg/. The paths should be referring to the /lib/python.2.5/site-packages/ directory inside the virtualenv, shouldn't they?
answered 2012-05-16 19:18:14 -0500chorylee
To allanw: I have the same problem: ImproperlyConfigured: Error importing middleware askbot.middleware.anon_user: "No module named keyedcache"
My virtual host is based on mod_python, firstly I though it's the problem of mod_python. I have tried sevreal other open source applications and it works, so it should be not the issue of mod_python. Then I found your reply, and added "/path/to/site-packages" directory to my PYTHONPATH in the file ".htaccess", but it can't works. Could you help to explain your solution with more details, tks in advance.
Create your Q&A site at askbot.com. Managed Askbot hosting at just $15/mo. Dedicated hosting, support contracts, consulting services.create your Q&A site
Asked: 2011-02-10 20:20:56 -0500
Seen: 220 times
Last updated: May 16 '12