Hey,

Apologies for the possible dumb question.

Setting up Apache/WSGI & Web2py and all works fine during setup using this 
script https://web2py.googlecode.com/hg/scripts/setup-web2py-ubuntu.sh. 
After setup when a page is accessed, an internal error (500) code is 
issued. Inspecting the logs shows:

[Mon Jan 04 11:03:40.297048 2016] [:error] [pid 17982:tid 140172647995136] 
[remote 192.168.219.254:17796] Traceback (most recent call last):
[Mon Jan 04 11:03:40.297070 2016] [:error] [pid 17982:tid 140172647995136] 
[remote 192.168.219.254:17796]   File 
"/home/www-data/web2py/wsgihandler.py", line 37, in <module>
[Mon Jan 04 11:03:40.297097 2016] [:error] [pid 17982:tid 140172647995136] 
[remote 192.168.219.254:17796]     import gluon.main
[Mon Jan 04 11:03:40.297113 2016] [:error] [pid 17982:tid 140172647995136] 
[remote 192.168.219.254:17796]   File 
"/home/www-data/web2py/gluon/__init__.py", line 32, in <module>
[Mon Jan 04 11:03:40.297134 2016] [:error] [pid 17982:tid 140172647995136] 
[remote 192.168.219.254:17796]     from globals import current
[Mon Jan 04 11:03:40.297148 2016] [:error] [pid 17982:tid 140172647995136] 
[remote 192.168.219.254:17796]   File 
"/home/www-data/web2py/gluon/globals.py", line 21, in <module>
[Mon Jan 04 11:03:40.297168 2016] [:error] [pid 17982:tid 140172647995136] 
[remote 192.168.219.254:17796]     from gluon.html import xmlescape, TABLE, 
TR, PRE, URL
[Mon Jan 04 11:03:40.297181 2016] [:error] [pid 17982:tid 140172647995136] 
[remote 192.168.219.254:17796]   File 
"/home/www-data/web2py/gluon/html.py", line 34, in <module>
[Mon Jan 04 11:03:40.297201 2016] [:error] [pid 17982:tid 140172647995136] 
[remote 192.168.219.254:17796]     from gluon.utils import web2py_uuid, 
simple_hash, compare
[Mon Jan 04 11:03:40.297214 2016] [:error] [pid 17982:tid 140172647995136] 
[remote 192.168.219.254:17796]   File 
"/home/www-data/web2py/gluon/utils.py", line 42, in <module>
[Mon Jan 04 11:03:40.297233 2016] [:error] [pid 17982:tid 140172647995136] 
[remote 192.168.219.254:17796]     import gluon.contrib.aes as AES
[Mon Jan 04 11:03:40.297253 2016] [:error] [pid 17982:tid 140172647995136] 
[remote 192.168.219.254:17796] AttributeError: 'module' object has no 
attribute 'contrib'

Setting it up on clean machine and it works fine, and I'm puzzled as to 
what's going wrong. If I try to import gluon.contrib on the command line I 
don't get any problems, and permissions are set up identically on both 
machines.

I've tried looking at the sys.path value as per this 
thread: https://www.mail-archive.com/[email protected]/msg120102.html 
and it seems fine, to be sure, I added a hack in the wsgihandler.py of each 
script to ensure they are the same.

Does anyone have any good ideas as to next steps for troubleshooting?

I'm running the latest version of apache on ubuntu 14.04 and the latest 
web2py. (On both servers).

Thanks,
Tom


-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to