Web2py admin page causing internal error (version 2.9.10)

221 views
Skip to first unread message

Mark Li

unread,
Jul 29, 2015, 1:20:36 PM7/29/15
to web2py-users
I just upgraded my web2py version on Pythonanywhere from 2.7.4 to 2.9.10, so my live site can match my test site web2py version

This in turn has caused the admin page to start producing errors, so I am unable to look at error tickets (they will just produce more errors).

I'm quite lost as to what I can do to fix this problem, as I can't even read the error tickets (it's just a continuing cycle of internal errors).

Dave S

unread,
Jul 29, 2015, 1:52:06 PM7/29/15
to web2py-users, markru...@gmail.com

You probably need to clear old sessions and old tickets out (back up the tickets, then clear the directory).  As I remember it, old sessions and old tickets were the two biggest sources of error loops.

/dps
 

Mark Li

unread,
Jul 29, 2015, 2:24:07 PM7/29/15
to web2py-users, snide...@gmail.com
I've run sessions2trash.py to remove all sessions, as well as remove all the files from the errors folder. Unfortunately I'm still getting the error loop. Should I do this for the admin app as well?

Mark Li

unread,
Jul 29, 2015, 2:44:44 PM7/29/15
to web2py-users, snide...@gmail.com, markru...@gmail.com
I am looking at the errors for the admin (at the files), and I am getting a "<type 'exceptions.NameError'> name 'DEMO_MODE' is not defined"" error

Dave S

unread,
Jul 29, 2015, 3:30:09 PM7/29/15
to web2py-users, markru...@gmail.com


On Wednesday, July 29, 2015 at 11:44:44 AM UTC-7, Mark Li wrote:
I am looking at the errors for the admin (at the files), and I am getting a "<type 'exceptions.NameError'> name 'DEMO_MODE' is not defined"" error


That doesn't ring any bells for me, although I'm currently on 2.11.2.  I think the step that required some extra effort for pydal 2.10.x.

/dps


 

Richard Vézina

unread,
Jul 29, 2015, 3:49:42 PM7/29/15
to web2py-users
Did you update the admin app?

Also, if I remember there have been many correction over 2.10.x web2py build... I would avoid the 2.10.x series for this reason... I remember having testing and having found it not that stable and I stay with 2.9.5...

2.11.2 seems to work great...

Richard

--
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 web2py+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Richard Vézina

unread,
Jul 29, 2015, 3:52:54 PM7/29/15
to web2py-users
sorry I miss read... 2.9.10...

Why not 2.9.12...

Why not install 2.11.2??

Richard

Mark Li

unread,
Jul 29, 2015, 11:31:44 PM7/29/15
to web2py-users, ml.richa...@gmail.com
I've updated to version 2.11.2, and the problem still persists. I've deleted all errors, cache, and sessions for both admin app and "myapp"

I am getting the following traceback when I look in the admin/errors files:

Traceback (most recent call last):
  File "/home/marladarla7/web2py/
gluon/restricted.py", line 224, in restricted
    exec ccode in environment
  File "applications/admin/models/0_imports.py", line 15, in <module>
    from mercurial import ui, hg, cmdutil
  File "/home/marladarla7/web2py/gluon/custom_import.py", line 71, in custom_importer
    return NATIVE_IMPORTER(oname, globals, locals, fromlist, level)
  File "mercurial.py", line 3, in <module>
    if DEMO_MODE or MULTI_USER_MODE:
NameError: name 'DEMO_MODE' is not defined

I have checked 0.py model, and DEMO_MODE = False, so I have no idea why I am getting this error

Mark Li

unread,
Jul 30, 2015, 12:48:29 AM7/30/15
to web...@googlegroups.com
Deleting all the .pyc files from the web2py directory seems to have done the trick.

You received this message because you are subscribed to a topic in the Google Groups "web2py-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/web2py/Z84QlkT6MqE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to web2py+un...@googlegroups.com.

Richard Vézina

unread,
Jul 30, 2015, 9:28:22 AM7/30/15
to web2py-users
Don't forget to update the web2py file in your app...

Backup your app before :)


Richard

Mark Li

unread,
Jul 30, 2015, 2:39:44 PM7/30/15
to web...@googlegroups.com
I did miss this, I keep skipping over this part!

Richard Vézina

unread,
Jul 30, 2015, 2:45:59 PM7/30/15
to web2py-users
You mean you don't do it and your app still works? Or you are not there yet...

Hope it works for you...

Richard

Mark Li

unread,
Jul 30, 2015, 4:39:07 PM7/30/15
to web...@googlegroups.com
I didn't update the extra files from web2py (like appadmin.py) into my app folder, but it still worked. I've updated the files now as well though.

Richard Vézina

unread,
Jul 30, 2015, 4:46:19 PM7/30/15
to web2py-users
If you have not customized them it is a not brainer and you are much more confident that your app is working properly with the new web2py version...

The only thing is that the new welcome is BS3 based, so you may take care if you are not ready for it...

Richard
Reply all
Reply to author
Forward
0 new messages