Admin and tickets broken after upgrade to 2.9.4

193 views
Skip to first unread message

shapova...@gmail.com

unread,
Mar 10, 2014, 8:02:55 PM3/10/14
to web...@googlegroups.com
Just hit upgrade now to Version 2.9.4 button and in web2py/applications/admin/errors:        

sssg317
S'Traceback (most recent call last):\n  File "/home/www-data/web2py/gluon/restricted.py", line 217, in restricted\n    exec ccode in environment\n  File "/home/www-data/web2py/applications/admin/controllers/default.py", line 16, in <module>\n    from gluon.compileapp import find_exposed_functions\nImportError: cannot import name find_exposed_functions\n'
p553


Any ideas?

Massimo Di Pierro

unread,
Mar 10, 2014, 8:04:15 PM3/10/14
to web...@googlegroups.com
What did you upgrade from? You may have to restart web2py.

shapova...@gmail.com

unread,
Mar 10, 2014, 8:11:08 PM3/10/14
to web...@googlegroups.com
Thanks form prompt reply! 

Upgrade from previous 2.9.3, 

Just did 
#apachectl restart

and now it complains on wsgihandler.py 

[Tue Mar 11 02:07:03 2014] [notice] Apache/2.2.16 (Debian) PHP/5.3.3-7+squeeze18 with Suhosin-Patch mod_ssl/2.2.16 OpenSSL/0.9.8o mod_wsgi/3.3 Python/2.6.6 configured -- resuming normal operations
[Tue Mar 11 02:07:12 2014] [error] [client ] mod_wsgi (pid=1277): Target WSGI script '/home/www-data/web2py/wsgihandler.py' cannot be loaded as Python module.
[Tue Mar 11 02:07:12 2014] [error] [client ] mod_wsgi (pid=1277): Exception occurred processing WSGI script '/home/www-data/web2py/wsgihandler.py'.
[Tue Mar 11 02:07:12 2014] [error] [client ] Traceback (most recent call last):
[Tue Mar 11 02:07:12 2014] [error] [client ]   File "/home/www-data/web2py/wsgihandler.py", line 37, in <module>
[Tue Mar 11 02:07:12 2014] [error] [client ]     import gluon.main
[Tue Mar 11 02:07:12 2014] [error] [client ]   File "/home/www-data/web2py/gluon/__init__.py", line 21, in <module>
[Tue Mar 11 02:07:12 2014] [error] [client ]     from compileapp import LOAD
[Tue Mar 11 02:07:12 2014] [error] [client ]   File "/home/www-data/web2py/gluon/compileapp.py", line 26, in <module>
[Tue Mar 11 02:07:12 2014] [error] [client ]     from gluon.myregex import regex_expose, regex_longcomments
[Tue Mar 11 02:07:12 2014] [error] [client ] ImportError: cannot import name regex_longcomments

shapova...@gmail.com

unread,
Mar 10, 2014, 8:54:05 PM3/10/14
to web...@googlegroups.com
Next, I've looked and found no regex_longcomments defined in myregex.py so I comment it's import out.

Got rid of wsgi load error but obviously still get 
S'Traceback (most recent call last):\n  File "/home/www-data/web2py/gluon/main.py", line 446, in wsgibase\n    serve_controller(request, response, session)\n  File "/home/www-data/web2py/gluon/main.py", line 192, in serve_controller\n    page = run_controller_in(request.controller, request.function, environment)\n  File "/home/www-data/web2py/gluon/compileapp.py", line 621, in run_controller_in\n    exposed = find_exposed_functions(code)\n  File "/home/www-data/web2py/gluon/compileapp.py", line 498, in find_exposed_functions\n    data = regex_longcomments.sub(\'\',data)\nNameError: global name \'regex_longcomments\' is not defined\n'

Massimo Di Pierro

unread,
Mar 10, 2014, 9:39:55 PM3/10/14
to web...@googlegroups.com
It is there:

something broke during your upgrade. Perhaps web2py did not have permission to overwrite the files.
Download the latest web2py and unzip over the existing one. (make a backup first).

shapova...@gmail.com

unread,
Mar 13, 2014, 5:56:06 PM3/13/14
to
Thanks, just did it, unzipped http://www.web2py.com/examples/static/web2py_src.zip on top of web2py old install, now it says:

[Thu Mar 13 23:49:54 2014] [error] [client ]     from sqlhtml import SQLFORM, SQLTABLE
[Thu Mar 13 23:49:54 2014] [error] [client ]   File "/home/www-data/web2py/gluon/gluon/sqlhtml.py", line 35, in <module>
[Thu Mar 13 23:49:54 2014] [error] [client ]     from gluon.globals import current
[Thu Mar 13 23:49:54 2014] [error] [client ] ImportError: cannot import name current

 in apache error.log

Permissions for www dir look OK.

it it only me with this kind of problems?

Massimo Di Pierro

unread,
Mar 13, 2014, 6:14:11 PM3/13/14
to web...@googlegroups.com
Another user has reported a similar problem on google app engine and it was due to a circular reference. Strangely I could not reproduce it. Anyway, it is fixed.

My suggestion is try unzip in a different (new) folder and check if it works.



On Thursday, 13 March 2014 16:55:10 UTC-5, shapova...@gmail.com wrote:
Thanks, just did it, unzipped http://www.web2py.com/examples/static/web2py_src.zip on top of web2py old install, now it says:

[Thu Mar 13 23:49:54 2014] [error] [client ]     from sqlhtml import SQLFORM, SQLTABLE
[Thu Mar 13 23:49:54 2014] [error] [client ]   File "/home/www-data/web2py/gluon/gluon/sqlhtml.py", line 35, in <module>
[Thu Mar 13 23:49:54 2014] [error] [client ]     from gluon.globals import current
[Thu Mar 13 23:49:54 2014] [error] [client ] ImportError: cannot import name current

 in apache error.log

Permissions for www dir look OK.

it it only me with this kind of problems?


shapova...@gmail.com

unread,
Mar 13, 2014, 6:42:09 PM3/13/14
to web...@googlegroups.com
Your suggestion just did the trick. But now I'm curious - what was the problem then??

Massimo Di Pierro

unread,
Mar 14, 2014, 9:47:45 AM3/14/14
to web...@googlegroups.com
I cannot say. There is some file in there that does not get overwritten when you unzip it.

Jason Lee

unread,
Jan 21, 2015, 4:51:16 PM1/21/15
to web...@googlegroups.com
I was able to fix the issue by changing the file ownership back to www-data.  During the update process some of the files changed ownership.

form the /www-data directory I ran sudo chown -R www-data:www-data web2py/

Now it works fine

Jason
Reply all
Reply to author
Forward
0 new messages