I upgraded to version 2.11.2, but the error was still occurring. I deleted all the .pyc files from the web2py directory and this seems to have solved the problem.
On Wednesday, July 29, 2015 at 12:06:46 PM UTC-7, Mark Li wrote: > > I am getting a very odd error in my admin app (2.9.10) on PythonAnywhere. > I am getting the following error: > > 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 > > This error started occurring after I unzipped the 2.9.10 web2py zip over > my old install (2.7.4). > -- 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.

