does 0.8 wikipbx works with python 2.4
Forum » WikiPBX / Technical Support » does 0.8 wikipbx works with python 2.4
Started by: yzsjyzsj
On: 1264825228|%e %b %Y, %H:%M %Z|agohover
Number of posts: 8
rss icon RSS: New posts
Summary:
Can not make GUI working in CentOS 5.4
does 0.8 wikipbx works with python 2.4
yzsjyzsj 1264825228|%e %b %Y, %H:%M %Z|agohover

Hi,

I am using CentOS 5.4 which has python 2.4 included. I can not make wikipbx work on it. I basically use the same parameters in my test machine as the install guide. There is no error log messages in wikipbx.yourserver.net-error.log, but from freeswitch console I saw

2010-01-29 18:35:21.230134 [ERR] mod_xml_curl.c:304 Received HTTP error 500 trying to fetch http://wikipbx.yourserver.net/xml_dialplan/
data: [hostname=localhost.localdomain&section=configuration&tag_name=configuration&key_name=name&key_value=event_socket.conf]

wikipbx related are all in /usr/src and freeswitch is in /root/work/freeswitch

WSGIPythonPath /usr/src/wikipbx:/usr/src/django:/root/work/freeswitch/libs/esl/python

also copied

[root@localhost freeswitch]# ls -l /usr/lib/python2.4/site-packages/*ESL*
-rw-rr 1 root root 4916 Jan 29 19:34 /usr/lib/python2.4/site-packages/ESL.py
-rwxr-xr-x 1 root root 202634 Jan 29 19:34 /usr/lib/python2.4/site-packages/_ESL.so

When I go to http://wikipbx.yourserver.net/, I just get the following. What could the
problem be? Do I must upgrade the python to a newer version?

Thanks!

SyntaxError at /
invalid syntax (views.py, line 1267)
Request Method: GET
Request URL: http://wikipbx.yourserver.net/
Exception Type: SyntaxError
Exception Value: invalid syntax (views.py, line 1267)
Exception Location: /usr/src/django/django/core/urlresolvers.py in _get_callback, line 126
Traceback (innermost last)
Switch to copy-and-paste view

* /usr/src/django/django/core/handlers/base.py in get_response
61. return response
62.
63. # Get urlconf from request object, if available. Otherwise use default.
64. urlconf = getattr(request, "urlconf", settings.ROOT_URLCONF)
65.
66. resolver = urlresolvers.RegexURLResolver(r'^/', urlconf)
67. try:
68. callback, callback_args, callback_kwargs = resolver.resolve(request.path) …
69.
70. # Apply view middleware
71. for middleware_method in self._view_middleware:
72. response = middleware_method(request, callback, callback_args, callback_kwargs)
73. if response:
74. return response
▶ Local vars
Variable Value
debug
<module 'django.views.debug' from '/usr/src/django/django/views/debug.py'>
exceptions
<module 'django.core.exceptions' from '/usr/src/django/django/core/exceptions.pyc'>
mail_admins
<function mail_admins at 0xb7d7872c>
middleware_method
<bound method AuthenticationMiddleware.process_request of <django.contrib.auth.middleware.AuthenticationMiddleware object at 0x869e8ac»
request
<WSGIRequest GET:<MultiValueDict: {}>, POST:<MultiValueDict: {}>, COOKIES:{}, META:{'DOCUMENT_ROOT': '/var/www/html', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', 'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.7', 'HTTP_ACCEPT_ENCODING': 'gzip,deflate', 'HTTP_ACCEPT_LANGUAGE': 'en-us,en;q=0.5', 'HTTP_CACHE_CONTROL': 'max-age=0', 'HTTP_CONNECTION': 'keep-alive', 'HTTP_HOST': 'wikipbx.yourserver.net', 'HTTP_KEEP_ALIVE': '300', 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.16) Gecko/2009121708 CentOS/3.0.16-1.el5.centos Firefox/3.0.16', 'PATH_INFO': '/', 'PATH_TRANSLATED': '/usr/src/wikipbx/wikipbx.wsgi/', 'QUERY_STRING': '', 'REMOTE_ADDR': '10.0.2.15', 'REMOTE_PORT': '33988', 'REQUEST_METHOD': 'GET', 'REQUEST_URI': '/', 'SCRIPT_FILENAME': '/usr/src/wikipbx/wikipbx.wsgi', 'SCRIPT_NAME': '', 'SERVER_ADDR': '10.0.2.15', 'SERVER_ADMIN': 'ten.revresruoy.xbpikiw|retsambew#ten.revresruoy.xbpikiw|retsambew', 'SERVER_NAME': 'wikipbx.yourserver.net', 'SERVER_PORT': '80', 'SERVER_PROTOCOL': 'HTTP/1.1', 'SERVER_SIGNATURE': '<address>Apache/2.2.3 (CentOS) Server at wikipbx.yourserver.net Port 80</address>\n', 'SERVER_SOFTWARE': 'Apache/2.2.3 (CentOS)', 'mod_wsgi.application_group': 'wikipbx.yourserver.net|', 'mod_wsgi.callable_object': 'application', 'mod_wsgi.handler_script': '', 'mod_wsgi.input_chunked': '0', 'mod_wsgi.listener_host': '', 'mod_wsgi.listener_port': '80', 'mod_wsgi.process_group': '', 'mod_wsgi.request_handler': 'wsgi-script', 'mod_wsgi.script_reloading': '1', 'mod_wsgi.version': (3, 1), 'wsgi.errors': <mod_wsgi.Log object at 0xb7edc430>, 'wsgi.file_wrapper': <built-in method file_wrapper of mod_wsgi.Adapter object at 0xb7e10ad0>, 'wsgi.input': <mod_wsgi.Input object at 0xb7edc390>, 'wsgi.multiprocess': True, 'wsgi.multithread': False, 'wsgi.run_once': False, 'wsgi.url_scheme': 'http', 'wsgi.version': (1, 1)}>
resolver
<django.core.urlresolvers.RegexURLResolver object at 0x86c902c>
response
None
self
<django.core.handlers.wsgi.WSGIHandler object at 0xb7ee35ac>
settings
<django.conf.LazySettings object at 0xb7dd084c>
urlconf
'wikipbx.urls'
urlresolvers
<module 'django.core.urlresolvers' from '/usr/src/django/django/core/urlresolvers.py'>
* /usr/src/django/django/core/urlresolvers.py in resolve
156. def resolve(self, path):
157. tried = []
158. match = self.regex.search(path)
159. if match:
160. new_path = path[match.end():]
161. for pattern in self.urlconf_module.urlpatterns:
162. try:
163. sub_match = pattern.resolve(new_path) …
164. except Resolver404, e:
165. tried.extend([(pattern.regex.pattern + ' ' + t) for t in e.args[0]['tried']])
166. else:
167. if sub_match:
168. sub_match_dict = dict(self.default_kwargs, **sub_match[2])
169. return sub_match[0], sub_match[1], dict(match.groupdict(), **sub_match_dict)
▶ Local vars
Variable Value
match
<_sre.SRE_Match object at 0x867fd40>
new_path
''
path
'/'
pattern
<django.core.urlresolvers.RegexURLPattern object at 0x8698bcc>
self
<django.core.urlresolvers.RegexURLResolver object at 0x86c902c>
sub_match
None
tried
['^admin/', '^(fav.ico)$', '^site_media/(.*)$', '^soundclips_media/(.*)$']
* /usr/src/django/django/core/urlresolvers.py in resolve
112. if kwargs:
113. args = ()
114. else:
115. args = match.groups()
116. # In both cases, pass any extra_kwargs as **kwargs.
117. kwargs.update(self.default_args)
118.
119. return self.callback, args, kwargs …
120.
121. def _get_callback(self):
122. if self._callback is not None:
123. return self._callback
124. mod_name, func_name = get_mod_func(self._callback_str)
125. try:
▼ Local vars
Variable Value
args
()
kwargs
{}
match
<_sre.SRE_Match object at 0x8680528>
path
''
self
<django.core.urlresolvers.RegexURLPattern object at 0x8698bcc>
* /usr/src/django/django/core/urlresolvers.py in _get_callback
119. return self.callback, args, kwargs
120.
121. def _get_callback(self):
122. if self._callback is not None:
123. return self._callback
124. mod_name, func_name = get_mod_func(self._callback_str)
125. try:
126. self._callback = getattr(import(mod_name, {}, {}, ['']), func_name) …
127. except ImportError, e:
128. raise ViewDoesNotExist, "Could not import %s. Error was: %s" % (mod_name, str(e))
129. except AttributeError, e:
130. raise ViewDoesNotExist, "Tried %s in module %s. Error was: %s" % (func_name, mod_name, str(e))
131. return self._callback
132. callback = property(_get_callback)
▼ Local vars
Variable Value
func_name
'index'
mod_name
'wikipbx.wikipbxweb.views'
self
<django.core.urlresolvers.RegexURLPattern object at 0x8698bcc>

Traceback (most recent call last):
File "/usr/src/django/django/core/handlers/base.py" in get_response
68. callback, callback_args, callback_kwargs = resolver.resolve(request.path)
File "/usr/src/django/django/core/urlresolvers.py" in resolve
163. sub_match = pattern.resolve(new_path)
File "/usr/src/django/django/core/urlresolvers.py" in resolve
119. return self.callback, args, kwargs
File "/usr/src/django/django/core/urlresolvers.py" in _get_callback
126. self._callback = getattr(import(mod_name, {}, {}, ['']), func_name)

SyntaxError at /
invalid syntax (views.py, line 1267)

Reply  |  Options
Unfold does 0.8 wikipbx works with python 2.4 by yzsjyzsj, 1264825228|%e %b %Y, %H:%M %Z|agohover
Re: does 0.8 wikipbx works with python 2.4
stas_shtinstas_shtin 1264843154|%e %b %Y, %H:%M %Z|agohover

Hi,

Only python 2.5/2.6 are supported.

Stas.

Reply  |  Options
Unfold Re: does 0.8 wikipbx works with python 2.4 by stas_shtinstas_shtin, 1264843154|%e %b %Y, %H:%M %Z|agohover
Re: does 0.8 wikipbx works with python 2.4
stas_shtinstas_shtin 1264843374|%e %b %Y, %H:%M %Z|agohover

Btw, someone has walked this path before - see notes here.

Reply  |  Options
Unfold Re: does 0.8 wikipbx works with python 2.4 by stas_shtinstas_shtin, 1264843374|%e %b %Y, %H:%M %Z|agohover
Re: does 0.8 wikipbx works with python 2.4
yzsjyzsj 1264979583|%e %b %Y, %H:%M %Z|agohover

Hi, Stas,

I replaced the 2.4 python with 2.6 in CentOS 5.4. I still got an error. When I try to visit the web page, I got the following in the log:

[root@localhost fs]# tail -f /var/log/httpd/wikipbx.yourserver.net-error.log
[Sun Jan 31 14:56:47 2010] [error] [client 127.0.0.1] [Errno 13] Permission denied: '/var/www/.python-eggs'
[Sun Jan 31 14:56:47 2010] [error] [client 127.0.0.1]
[Sun Jan 31 14:56:47 2010] [error] [client 127.0.0.1] The Python egg cache directory is currently set to:
[Sun Jan 31 14:56:47 2010] [error] [client 127.0.0.1]
[Sun Jan 31 14:56:47 2010] [error] [client 127.0.0.1] /var/www/.python-eggs
[Sun Jan 31 14:56:47 2010] [error] [client 127.0.0.1]
[Sun Jan 31 14:56:47 2010] [error] [client 127.0.0.1] Perhaps your account does not have write access to this directory? You can
[Sun Jan 31 14:56:47 2010] [error] [client 127.0.0.1] change the cache directory by setting the PYTHON_EGG_CACHE environment
[Sun Jan 31 14:56:47 2010] [error] [client 127.0.0.1] variable to point to an accessible directory.
[Sun Jan 31 14:56:47 2010] [error] [client 127.0.0.1]

Did I miss something? I installed everything using root account. After I do "chmod -R 777 /var/www/", I can see the login screen. However, I found the following error happens rather often if I just kept refreshing the login screen. Any clue on this? django is 5024 advised version. Thanks!

AttributeError at /
'WSGIRequest' object has no attribute 'user'
Request Method: GET
Request URL: http://localhost/
Exception Type: AttributeError
Exception Value: 'WSGIRequest' object has no attribute 'user'
Exception Location: /usr/src/django/django/core/context_processors.py in auth, line 18
Traceback (innermost last)
Switch to copy-and-paste view

* /usr/src/django/django/core/handlers/base.py in get_response
70. # Apply view middleware
71. for middleware_method in self._view_middleware:
72. response = middleware_method(request, callback, callback_args, callback_kwargs)
73. if response:
74. return response
75.
76. try:
77. response = callback(request, *callback_args, **callback_kwargs) …
78. except Exception, e:
79. # If the view raised an exception, run it through exception
80. # middleware, and if the exception middleware returns a
81. # response, use that. Otherwise, reraise the exception.
82. for middleware_method in self._exception_middleware:
83. response = middleware_method(request, e)
▶ Local vars
Variable Value
callback
<function index at 0x988e33c>
callback_args
()
callback_kwargs
{}
debug
<module 'django.views.debug' from '/usr/src/django/django/views/debug.py'>
e
AttributeError("'WSGIRequest' object has no attribute 'user'",)
exceptions
<module 'django.core.exceptions' from '/usr/src/django/django/core/exceptions.pyc'>
mail_admins
<function mail_admins at 0x9275a3c>
middleware_method
<bound method CommonMiddleware.process_request of <django.middleware.common.CommonMiddleware object at 0x9272fec»
request
<WSGIRequest GET:<MultiValueDict: {}>, POST:<MultiValueDict: {}>, COOKIES:{}, META:{'DOCUMENT_ROOT': '/var/www/html', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', 'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.7', 'HTTP_ACCEPT_ENCODING': 'gzip,deflate', 'HTTP_ACCEPT_LANGUAGE': 'en-us,en;q=0.5', 'HTTP_CACHE_CONTROL': 'max-age=0', 'HTTP_CONNECTION': 'keep-alive', 'HTTP_HOST': 'localhost', 'HTTP_KEEP_ALIVE': '300', 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.12) Gecko/2009072711 CentOS/3.0.12-1.el5.centos Firefox/3.0.12', 'PATH_INFO': '/', 'PATH_TRANSLATED': '/usr/src/wikipbx/wikipbx.wsgi/', 'QUERY_STRING': '', 'REMOTE_ADDR': '127.0.0.1', 'REMOTE_PORT': '48318', 'REQUEST_METHOD': 'GET', 'REQUEST_URI': '/', 'SCRIPT_FILENAME': '/usr/src/wikipbx/wikipbx.wsgi', 'SCRIPT_NAME': '', 'SERVER_ADDR': '127.0.0.1', 'SERVER_ADMIN': 'ten.revresruoy.xbpikiw|retsambew#ten.revresruoy.xbpikiw|retsambew', 'SERVER_NAME': 'localhost', 'SERVER_PORT': '80', 'SERVER_PROTOCOL': 'HTTP/1.1', 'SERVER_SIGNATURE': '<address>Apache/2.2.3 (CentOS) Server at localhost Port 80</address>\n', 'SERVER_SOFTWARE': 'Apache/2.2.3 (CentOS)', 'mod_wsgi.application_group': 'wikipbx.yourserver.net|', 'mod_wsgi.callable_object': 'application', 'mod_wsgi.handler_script': '', 'mod_wsgi.input_chunked': '0', 'mod_wsgi.listener_host': '', 'mod_wsgi.listener_port': '80', 'mod_wsgi.process_group': '', 'mod_wsgi.request_handler': 'wsgi-script', 'mod_wsgi.script_reloading': '1', 'mod_wsgi.version': (3, 1), 'wsgi.errors': <mod_wsgi.Log object at 0x922b458>, 'wsgi.file_wrapper': <built-in method file_wrapper of mod_wsgi.Adapter object at 0xb7e0f698>, 'wsgi.input': <mod_wsgi.Input object at 0x9270db8>, 'wsgi.multiprocess': True, 'wsgi.multithread': False, 'wsgi.run_once': False, 'wsgi.url_scheme': 'http', 'wsgi.version': (1, 1)}>
resolver
<django.core.urlresolvers.RegexURLResolver object at 0x97b148c>
response
None
self
<django.core.handlers.wsgi.WSGIHandler object at 0x912becc>
settings
<django.conf.LazySettings object at 0x922ffec>
urlconf
'wikipbx.urls'
urlresolvers
<module 'django.core.urlresolvers' from '/usr/src/django/django/core/urlresolvers.py'>
* /usr/src/wikipbx/wikipbx/wikipbxweb/views.py in index
41. from wikipbx.wikipbxweb.forms import *
42. from wikipbx.wikipbxweb.paginator import Paginator
43. from xml.dom import minidom
44.
45.
46. def index(request):
47. return simple.direct_to_template(
48. request, 'index.html', {'nousers': not User.objects.all()}) …
49.
50. def dashboard(request):
51. if not request.user.is_authenticated():
52. msg = "Must be logged in to view this resource"
53. return http.HttpResponseRedirect("/?urgentmsg=%s" % msg)
54. return simple.direct_to_template(request, 'dashboard.html')
▶ Local vars
Variable Value
request
<WSGIRequest GET:<MultiValueDict: {}>, POST:<MultiValueDict: {}>, COOKIES:{}, META:{'DOCUMENT_ROOT': '/var/www/html', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', 'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.7', 'HTTP_ACCEPT_ENCODING': 'gzip,deflate', 'HTTP_ACCEPT_LANGUAGE': 'en-us,en;q=0.5', 'HTTP_CACHE_CONTROL': 'max-age=0', 'HTTP_CONNECTION': 'keep-alive', 'HTTP_HOST': 'localhost', 'HTTP_KEEP_ALIVE': '300', 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.12) Gecko/2009072711 CentOS/3.0.12-1.el5.centos Firefox/3.0.12', 'PATH_INFO': '/', 'PATH_TRANSLATED': '/usr/src/wikipbx/wikipbx.wsgi/', 'QUERY_STRING': '', 'REMOTE_ADDR': '127.0.0.1', 'REMOTE_PORT': '48318', 'REQUEST_METHOD': 'GET', 'REQUEST_URI': '/', 'SCRIPT_FILENAME': '/usr/src/wikipbx/wikipbx.wsgi', 'SCRIPT_NAME': '', 'SERVER_ADDR': '127.0.0.1', 'SERVER_ADMIN': 'ten.revresruoy.xbpikiw|retsambew#ten.revresruoy.xbpikiw|retsambew', 'SERVER_NAME': 'localhost', 'SERVER_PORT': '80', 'SERVER_PROTOCOL': 'HTTP/1.1', 'SERVER_SIGNATURE': '<address>Apache/2.2.3 (CentOS) Server at localhost Port 80</address>\n', 'SERVER_SOFTWARE': 'Apache/2.2.3 (CentOS)', 'mod_wsgi.application_group': 'wikipbx.yourserver.net|', 'mod_wsgi.callable_object': 'application', 'mod_wsgi.handler_script': '', 'mod_wsgi.input_chunked': '0', 'mod_wsgi.listener_host': '', 'mod_wsgi.listener_port': '80', 'mod_wsgi.process_group': '', 'mod_wsgi.request_handler': 'wsgi-script', 'mod_wsgi.script_reloading': '1', 'mod_wsgi.version': (3, 1), 'wsgi.errors': <mod_wsgi.Log object at 0x922b458>, 'wsgi.file_wrapper': <built-in method file_wrapper of mod_wsgi.Adapter object at 0xb7e0f698>, 'wsgi.input': <mod_wsgi.Input object at 0x9270db8>, 'wsgi.multiprocess': True, 'wsgi.multithread': False, 'wsgi.run_once': False, 'wsgi.url_scheme': 'http', 'wsgi.version': (1, 1)}>
* /usr/src/django/django/views/generic/simple.py in direct_to_template
9. """
10. dictionary = {'params': kwargs}
11. for key, value in extra_context.items():
12. if callable(value):
13. dictionary[key] = value()
14. else:
15. dictionary[key] = value
16. c = RequestContext(request, dictionary) …
17. t = loader.get_template(template)
18. return HttpResponse(t.render(c), mimetype=mimetype)
19.
20. def redirect_to(request, url, **kwargs):
21. """
22. Redirect to a given URL.
▶ Local vars
Variable Value
dictionary
{'nousers': True, 'params': {}}
extra_context
{'nousers': True}
key
'nousers'
kwargs
{}
mimetype
None
request
<WSGIRequest GET:<MultiValueDict: {}>, POST:<MultiValueDict: {}>, COOKIES:{}, META:{'DOCUMENT_ROOT': '/var/www/html', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', 'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.7', 'HTTP_ACCEPT_ENCODING': 'gzip,deflate', 'HTTP_ACCEPT_LANGUAGE': 'en-us,en;q=0.5', 'HTTP_CACHE_CONTROL': 'max-age=0', 'HTTP_CONNECTION': 'keep-alive', 'HTTP_HOST': 'localhost', 'HTTP_KEEP_ALIVE': '300', 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.12) Gecko/2009072711 CentOS/3.0.12-1.el5.centos Firefox/3.0.12', 'PATH_INFO': '/', 'PATH_TRANSLATED': '/usr/src/wikipbx/wikipbx.wsgi/', 'QUERY_STRING': '', 'REMOTE_ADDR': '127.0.0.1', 'REMOTE_PORT': '48318', 'REQUEST_METHOD': 'GET', 'REQUEST_URI': '/', 'SCRIPT_FILENAME': '/usr/src/wikipbx/wikipbx.wsgi', 'SCRIPT_NAME': '', 'SERVER_ADDR': '127.0.0.1', 'SERVER_ADMIN': 'ten.revresruoy.xbpikiw|retsambew#ten.revresruoy.xbpikiw|retsambew', 'SERVER_NAME': 'localhost', 'SERVER_PORT': '80', 'SERVER_PROTOCOL': 'HTTP/1.1', 'SERVER_SIGNATURE': '<address>Apache/2.2.3 (CentOS) Server at localhost Port 80</address>\n', 'SERVER_SOFTWARE': 'Apache/2.2.3 (CentOS)', 'mod_wsgi.application_group': 'wikipbx.yourserver.net|', 'mod_wsgi.callable_object': 'application', 'mod_wsgi.handler_script': '', 'mod_wsgi.input_chunked': '0', 'mod_wsgi.listener_host': '', 'mod_wsgi.listener_port': '80', 'mod_wsgi.process_group': '', 'mod_wsgi.request_handler': 'wsgi-script', 'mod_wsgi.script_reloading': '1', 'mod_wsgi.version': (3, 1), 'wsgi.errors': <mod_wsgi.Log object at 0x922b458>, 'wsgi.file_wrapper': <built-in method file_wrapper of mod_wsgi.Adapter object at 0xb7e0f698>, 'wsgi.input': <mod_wsgi.Input object at 0x9270db8>, 'wsgi.multiprocess': True, 'wsgi.multithread': False, 'wsgi.run_once': False, 'wsgi.url_scheme': 'http', 'wsgi.version': (1, 1)}>
template
'index.html'
value
True
* /usr/src/django/django/template/context.py in init
93. def init(self, request, dict=None, processors=None):
94. Context.init(self, dict)
95. if processors is None:
96. processors = ()
97. else:
98. processors = tuple(processors)
99. for processor in get_standard_processors() + processors:
100. self.update(processor(request)) …
▶ Local vars
Variable Value
dict
{'nousers': True, 'params': {}}
processor
<function auth at 0x987c48c>
processors
()
request
<WSGIRequest GET:<MultiValueDict: {}>, POST:<MultiValueDict: {}>, COOKIES:{}, META:{'DOCUMENT_ROOT': '/var/www/html', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', 'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.7', 'HTTP_ACCEPT_ENCODING': 'gzip,deflate', 'HTTP_ACCEPT_LANGUAGE': 'en-us,en;q=0.5', 'HTTP_CACHE_CONTROL': 'max-age=0', 'HTTP_CONNECTION': 'keep-alive', 'HTTP_HOST': 'localhost', 'HTTP_KEEP_ALIVE': '300', 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.12) Gecko/2009072711 CentOS/3.0.12-1.el5.centos Firefox/3.0.12', 'PATH_INFO': '/', 'PATH_TRANSLATED': '/usr/src/wikipbx/wikipbx.wsgi/', 'QUERY_STRING': '', 'REMOTE_ADDR': '127.0.0.1', 'REMOTE_PORT': '48318', 'REQUEST_METHOD': 'GET', 'REQUEST_URI': '/', 'SCRIPT_FILENAME': '/usr/src/wikipbx/wikipbx.wsgi', 'SCRIPT_NAME': '', 'SERVER_ADDR': '127.0.0.1', 'SERVER_ADMIN': 'ten.revresruoy.xbpikiw|retsambew#ten.revresruoy.xbpikiw|retsambew', 'SERVER_NAME': 'localhost', 'SERVER_PORT': '80', 'SERVER_PROTOCOL': 'HTTP/1.1', 'SERVER_SIGNATURE': '<address>Apache/2.2.3 (CentOS) Server at localhost Port 80</address>\n', 'SERVER_SOFTWARE': 'Apache/2.2.3 (CentOS)', 'mod_wsgi.application_group': 'wikipbx.yourserver.net|', 'mod_wsgi.callable_object': 'application', 'mod_wsgi.handler_script': '', 'mod_wsgi.input_chunked': '0', 'mod_wsgi.listener_host': '', 'mod_wsgi.listener_port': '80', 'mod_wsgi.process_group': '', 'mod_wsgi.request_handler': 'wsgi-script', 'mod_wsgi.script_reloading': '1', 'mod_wsgi.version': (3, 1), 'wsgi.errors': <mod_wsgi.Log object at 0x922b458>, 'wsgi.file_wrapper': <built-in method file_wrapper of mod_wsgi.Adapter object at 0xb7e0f698>, 'wsgi.input': <mod_wsgi.Input object at 0x9270db8>, 'wsgi.multiprocess': True, 'wsgi.multithread': False, 'wsgi.run_once': False, 'wsgi.url_scheme': 'http', 'wsgi.version': (1, 1)}>
self
[{'nousers': True, 'params': {}}]
* /usr/src/django/django/core/context_processors.py in auth
11.
12. def auth(request):
13. """
14. Returns context variables required by apps that use Django's authentication
15. system.
16. """
17. return {
18. 'user': request.user, …
19. 'messages': request.user.get_and_delete_messages(),
20. 'perms': PermWrapper(request.user),
21. }
22.
23. def debug(request):
24. "Returns context variables helpful for debugging."
▶ Local vars
Variable Value
request
<WSGIRequest GET:<MultiValueDict: {}>, POST:<MultiValueDict: {}>, COOKIES:{}, META:{'DOCUMENT_ROOT': '/var/www/html', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', 'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.7', 'HTTP_ACCEPT_ENCODING': 'gzip,deflate', 'HTTP_ACCEPT_LANGUAGE': 'en-us,en;q=0.5', 'HTTP_CACHE_CONTROL': 'max-age=0', 'HTTP_CONNECTION': 'keep-alive', 'HTTP_HOST': 'localhost', 'HTTP_KEEP_ALIVE': '300', 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.12) Gecko/2009072711 CentOS/3.0.12-1.el5.centos Firefox/3.0.12', 'PATH_INFO': '/', 'PATH_TRANSLATED': '/usr/src/wikipbx/wikipbx.wsgi/', 'QUERY_STRING': '', 'REMOTE_ADDR': '127.0.0.1', 'REMOTE_PORT': '48318', 'REQUEST_METHOD': 'GET', 'REQUEST_URI': '/', 'SCRIPT_FILENAME': '/usr/src/wikipbx/wikipbx.wsgi', 'SCRIPT_NAME': '', 'SERVER_ADDR': '127.0.0.1', 'SERVER_ADMIN': 'ten.revresruoy.xbpikiw|retsambew#ten.revresruoy.xbpikiw|retsambew', 'SERVER_NAME': 'localhost', 'SERVER_PORT': '80', 'SERVER_PROTOCOL': 'HTTP/1.1', 'SERVER_SIGNATURE': '<address>Apache/2.2.3 (CentOS) Server at localhost Port 80</address>\n', 'SERVER_SOFTWARE': 'Apache/2.2.3 (CentOS)', 'mod_wsgi.application_group': 'wikipbx.yourserver.net|', 'mod_wsgi.callable_object': 'application', 'mod_wsgi.handler_script': '', 'mod_wsgi.input_chunked': '0', 'mod_wsgi.listener_host': '', 'mod_wsgi.listener_port': '80', 'mod_wsgi.process_group': '', 'mod_wsgi.request_handler': 'wsgi-script', 'mod_wsgi.script_reloading': '1', 'mod_wsgi.version': (3, 1), 'wsgi.errors': <mod_wsgi.Log object at 0x922b458>, 'wsgi.file_wrapper': <built-in method file_wrapper of mod_wsgi.Adapter object at 0xb7e0f698>, 'wsgi.input': <mod_wsgi.Input object at 0x9270db8>, 'wsgi.multiprocess': True, 'wsgi.multithread': False, 'wsgi.run_once': False, 'wsgi.url_scheme': 'http', 'wsgi.version': (1, 1)}>

Traceback (most recent call last):
File "/usr/src/django/django/core/handlers/base.py" in get_response
77. response = callback(request, *callback_args, **callback_kwargs)
File "/usr/src/wikipbx/wikipbx/wikipbxweb/views.py" in index
48. request, 'index.html', {'nousers': not User.objects.all()})
File "/usr/src/django/django/views/generic/simple.py" in direct_to_template
16. c = RequestContext(request, dictionary)
File "/usr/src/django/django/template/context.py" in init
100. self.update(processor(request))
File "/usr/src/django/django/core/context_processors.py" in auth
18. 'user': request.user,

AttributeError at /
'WSGIRequest' object has no attribute 'user'

Reply  |  Options
Unfold Re: does 0.8 wikipbx works with python 2.4 by yzsjyzsj, 1264979583|%e %b %Y, %H:%M %Z|agohover
Re: does 0.8 wikipbx works with python 2.4
stas_shtinstas_shtin 1265044945|%e %b %Y, %H:%M %Z|agohover

What variables did you change in your settings file? I'm especially interested in MIDDLEWARE_CLASSES and TEMPLATE_CONTEXT_PROCESSORS values.

Reply  |  Options
Unfold Re: does 0.8 wikipbx works with python 2.4 by stas_shtinstas_shtin, 1265044945|%e %b %Y, %H:%M %Z|agohover
Re: does 0.8 wikipbx works with python 2.4
yzsjyzsj 1265046306|%e %b %Y, %H:%M %Z|agohover

It looks OK now after I restarted my box today. I do not know why and I changed nothing. It was in a virtual machine. Have tried twice to reinstall the whole system (I think I have done reboot with it), and always saw that error. It does not happen with every refresh click.

Thanks for the help!

[root@localhost wikipbx]# diff settings_template.py settings.py
25c25
< DATABASE_ENGINE = 'postgresql' # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'ado_mssql'.
—-

DATABASE_ENGINE = 'mysql' # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'ado_mssql'.

27,28c27,28
< DATABASE_USER = 'YOUR_DB_USER' # Not used with sqlite3.
< DATABASE_PASSWORD = 'YOUR_DB_PASS' # Not used with sqlite3.
—-

DATABASE_USER = 'fspbx' # Not used with sqlite3.
DATABASE_PASSWORD = 'fspbxpasswd' # Not used with sqlite3.

Reply  |  Options
Unfold Re: does 0.8 wikipbx works with python 2.4 by yzsjyzsj, 1265046306|%e %b %Y, %H:%M %Z|agohover
Re: does 0.8 wikipbx works with python 2.4
tleydentleyden 1265913379|%e %b %Y, %H:%M %Z|agohover

OK glad to hear you got it working!

Reply  |  Options
Unfold Re: does 0.8 wikipbx works with python 2.4 by tleydentleyden, 1265913379|%e %b %Y, %H:%M %Z|agohover
Re: does 0.8 wikipbx works with python 2.4
tleydentleyden 1265045330|%e %b %Y, %H:%M %Z|agohover

Hmm, I haven't come across this error before.

BTW I don't think chmod -R 777 /var/www/ will catch the hidden directories (those starting with a "."), so you may need to chmod that directory explicitly.

Reply  |  Options
Unfold Re: does 0.8 wikipbx works with python 2.4 by tleydentleyden, 1265045330|%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