Error running Wikipbx 0.8
Forum » WikiPBX / Technical Support » Error running Wikipbx 0.8
Started by: profhellprofhell
On: 1264452030|%e %b %Y, %H:%M %Z|agohover
Number of posts: 9
rss icon RSS: New posts
Summary:
Once installed, Wikipbx just logs an error about not being able to find wikipbx.settings. CentOS 5.4
Error running Wikipbx 0.8
profhellprofhell 1264452030|%e %b %Y, %H:%M %Z|agohover

Gents,

Perhaps a FAQ, but I couldn't find it anywhere on the FAQ list.

I've installed and configured all the pre-requisites for 0.8 on my CentOS 5.4 install, and all's well. That is until I open a page to wikipbx.mydomein.com.

All I get is an Error 500 page, and an error in the web server logs as follows:

[Mon Jan 25 20:27:45 2010] [error] [client 82.28.143.247] mod_wsgi (pid=6327): Exception occurred process
ing WSGI script '/usr/src/wikipbx/wikipbx.wsgi'.
[Mon Jan 25 20:27:45 2010] [error] [client 82.28.143.247] Traceback (most recent call last):
[Mon Jan 25 20:27:45 2010] [error] [client 82.28.143.247] File "/usr/lib/python2.4/site-packages/django
/core/handlers/wsgi.py", line 230, in call
[Mon Jan 25 20:27:45 2010] [error] [client 82.28.143.247] self.load_middleware()
[Mon Jan 25 20:27:45 2010] [error] [client 82.28.143.247] File "/usr/lib/python2.4/site-packages/django
/core/handlers/base.py", line 33, in load_middleware
[Mon Jan 25 20:27:45 2010] [error] [client 82.28.143.247] for middleware_path in settings.MIDDLEWARE_
CLASSES:
[Mon Jan 25 20:27:45 2010] [error] [client 82.28.143.247] File "/usr/lib/python2.4/site-packages/django
/utils/functional.py", line 269, in getattr
[Mon Jan 25 20:27:45 2010] [error] [client 82.28.143.247] self._setup()
[Mon Jan 25 20:27:45 2010] [error] [client 82.28.143.247] File "/usr/lib/python2.4/site-packages/django
/conf/init.py", line 40, in _setup
[Mon Jan 25 20:27:45 2010] [error] [client 82.28.143.247] self._wrapped = Settings(settings_module)
[Mon Jan 25 20:27:45 2010] [error] [client 82.28.143.247] File "/usr/lib/python2.4/site-packages/django
/conf/init.py", line 75, in init
[Mon Jan 25 20:27:45 2010] [error] [client 82.28.143.247] raise ImportError, "Could not import settin
gs '%s' (Is it on sys.path? Does it have syntax errors?): %s" % (self.SETTINGS_MODULE, e)
[Mon Jan 25 20:27:45 2010] [error] [client 82.28.143.247] ImportError: Could not import settings 'wikipbx
.settings' (Is it on sys.path? Does it have syntax errors?): No module named wikipbx.settings

There is a reference to wikipbx.settings in a number of files under the install directory, but I could not locate such a module anywhere.

Can anyone shed some light on this ?

Thanks in advance.

Reply  |  Options
Unfold Error running Wikipbx 0.8 by profhellprofhell, 1264452030|%e %b %Y, %H:%M %Z|agohover
Re: Error running Wikipbx 0.8
stas_shtinstas_shtin 1264452445|%e %b %Y, %H:%M %Z|agohover

As described in installation manual, you should copy wikipbx/settings_template.py flie to wikipbx/settings.py and customize it as necessary.

Reply  |  Options
Unfold Re: Error running Wikipbx 0.8 by stas_shtinstas_shtin, 1264452445|%e %b %Y, %H:%M %Z|agohover
Re: Error running Wikipbx 0.8
profhellprofhell 1264499409|%e %b %Y, %H:%M %Z|agohover

Thanks for this.

Already copied and customised.

Reply  |  Options
Unfold Re: Error running Wikipbx 0.8 by profhellprofhell, 1264499409|%e %b %Y, %H:%M %Z|agohover
Re: Error running Wikipbx 0.8
tleydentleyden 1264456448|%e %b %Y, %H:%M %Z|agohover

If you did indeed copy settings_template.py -> settings.py, double check your WSGIPythonPath variable for typo's. That's happened to me a few times .. got that same error because it couldn't find the settings.py module.

Essentially what's happening is that the python interpreter running in apache simply cannot find a python module called "settings", which it expects to find in a package called "wikipbx".

If you can't get it working it shouldn't be too hard to debug, just print out the sys.path from the wikipbx.wsgi file using:

print >> sys.stderr, "sys.path: %s" % sys.path

.. something like that at least, and you would see output in the /var/log/apache2/error.log file

Reply  |  Options
Unfold Re: Error running Wikipbx 0.8 by tleydentleyden, 1264456448|%e %b %Y, %H:%M %Z|agohover
Re: Error running Wikipbx 0.8
profhellprofhell 1264500026|%e %b %Y, %H:%M %Z|agohover

Thanks very much for this.

Excuse my ignorance of both python and wsgi, but I couldn't locate WSGIPythonPath anywhere in the scripts installed.

My install has the following hierarchy:

/usr/src/wikipbx: this is where the wikipbx tree is installed
/usr/lib/python2.4: this is where python 2.4 is installed
/usr/lib/python2.4/site-pakages

What is your recommendation for setting this path and in which file should that definition go ?

Thanks again.

Reply  |  Options
Unfold Re: Error running Wikipbx 0.8 by profhellprofhell, 1264500026|%e %b %Y, %H:%M %Z|agohover
Re: Error running Wikipbx 0.8
stas_shtinstas_shtin 1264502086|%e %b %Y, %H:%M %Z|agohover

Traun is talking about WSGIPythonPath directive in apache config. It's describe in apache configuration docs.

Also note that python 2.4 is not an officially supported version, so you should upgrade to python 2.5 or higher if you get messages with SyntaxError exceptions later.

Reply  |  Options
Unfold Re: Error running Wikipbx 0.8 by stas_shtinstas_shtin, 1264502086|%e %b %Y, %H:%M %Z|agohover
Re: Error running Wikipbx 0.8
profhellprofhell 1264501679|%e %b %Y, %H:%M %Z|agohover

Here is the result from error_log after adding the print line:

[error] sys.path: ['/usr/lib/python2.4/site-packages/MySQL_python-1.2.2-py2.4-linux-i686.egg', '/usr/lib/python2.4', '/usr/lib/python2.4/site-packages', '/usr/lib/python2.4/site-packages/wsgiproxy', '/usr/lib/python2.4/site-packages/wsgiref', '/usr/lib/python2.4/site-packages/wsgiref-0.1.2-py2.4.egg-info', '/usr/src/wikipbx/wikipbx', '/usr/src/wikipbx/wikipbx/wikipbxweb', '/usr/lib/python24.zip', '/usr/lib/python2.4/plat-linux2', '/usr/lib/python2.4/lib-tk', '/usr/lib/python2.4/lib-dynload', '/usr/lib/python2.4/site-packages/Numeric', '/usr/lib/python2.4/site-packages/PIL', '/usr/lib/python2.4/site-packages/gtk-2.0']

Any clues ?

Reply  |  Options
Unfold Re: Error running Wikipbx 0.8 by profhellprofhell, 1264501679|%e %b %Y, %H:%M %Z|agohover
Re: Error running Wikipbx 0.8
stas_shtinstas_shtin 1264503495|%e %b %Y, %H:%M %Z|agohover

It looks like you don't have '/usr/src/wikipbx' on your python path and you have '/usr/src/wikipbx/wikipbx/wikipbxweb' that I don't think is needed, although the latter shouldn't be relevant here. So what's your WSGIPythonPath in apache mod_wsgi config?

Reply  |  Options
Unfold Re: Error running Wikipbx 0.8 by stas_shtinstas_shtin, 1264503495|%e %b %Y, %H:%M %Z|agohover
Re: Error running Wikipbx 0.8
tleydentleyden 1264713604|%e %b %Y, %H:%M %Z|agohover

Are you all sorted out? Looks like its just a misconfigured WSGIPythonPath.. should be easy to fix.

Reply  |  Options
Unfold Re: Error running Wikipbx 0.8 by tleydentleyden, 1264713604|%e %b %Y, %H:%M %Z|agohover
New Post
page_revision: 0, last_edited: 1226259295|%e %b %Y, %H:%M %Z (%O ago)
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License