2.15.3: automatic update crashes appadmin

102 views
Skip to first unread message

Martin Weissenboeck

unread,
Aug 15, 2017, 4:10:28 AM8/15/17
to web2py-users
I have tried to use the automatic update to 2.15.3
The following problem occurs:

Internal error ... Ticked issued:...

But appadmin is corrupted, so it is not possible to read the ticket in a simple way.
A restart of web2py solves the problem.
Maybe there should be an extra hint to restart web2py after an error message?

I looked for some details:

The error message is:
type 'exceptions.NameError'> name 'iteritems' is not defined"


In application/admin/controllers/appadmin.py:

line 14:
from gluon._compat import iteritems

line 453:
for key, value in iteritems(cache.ram.storage):

I suppose that without a restart web2py does not find gluon._compat


Regards, Martin

Richard Vézina

unread,
Aug 15, 2017, 10:44:17 AM8/15/17
to web2py-users
Always the same issue... I would remove this update button to me... Whe you update web2py you need to update many web2py reserved files in your app that the web2py update don't do for you...

Those files includes :

view/

appadmin.html
generic.ics
generic.load
generic.rss
layout.html
generic.json   
generic.map   
generic.xml  
web2py_ajax.html
generic.html   
generic.jsonp  
generic.pdf

controller/
appadmin.py

static/
css/*
images/*
js/*

You can do this like that :

From web2py/applications

cp -R welcome/static/* YOURAPP/static/
cp welcome/controllers/appadmin.py  YOURAPP/controllers/
cp welcome/views/* test_copy_file/views/

Watch out the last command will override the layout.html...


This listing above is a copy/paste from one of my older post, so it may not be 100% accurate

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

Martin Weissenboeck

unread,
Aug 15, 2017, 10:53:46 AM8/15/17
to web2py-users
Thank you - should be mentioned in the book.

Richard Vézina

unread,
Aug 15, 2017, 10:54:18 AM8/15/17
to web2py-users
Yes, I consider creating a gist too...

Richard

Richard Vézina

unread,
Aug 15, 2017, 10:55:53 AM8/15/17
to web2py-users

Richard Vézina

unread,
Aug 15, 2017, 10:56:27 AM8/15/17
to web2py-users
web2py does not upgrade any file in your applications. Some important parts of the framework are not part of the libraries, but part of the Welcome app. New apps will inherit these framework changes, but not existing apps. You need to do copy or merge changes manually. Sometimes this is necessary to take advantage of new functionality, and sometimes it is necessary for compatibility with new releases, particularly if you are using experimental features. The web2py group at Google Groups is a good way to keep track of necessary changes. Parts of the welcome app to copy to existing apps are the appadmin controller, the top-level views including appadmin.html and the generic views, and the contents of the static folder which contains the latest version of important javascript files. Obviously you need to merge your changes (if any). Keeping backups or using a version control system is a sound idea.

Martin Weissenboeck

unread,
Aug 15, 2017, 11:25:42 AM8/15/17
to web2py-users
Did you mean ... ?

Those files includes :

views/

appadmin.html
generic.ics
generic.load
generic.rss
layout.html
generic.json   
generic.map   
generic.xml  
web2py_ajax.html
generic.html   
generic.jsonp  
generic.pdf

controller/
appadmin.py

static/
css/*
images/*
js/*

You can do this like that :

From web2py/applications

cp -R welcome/static/* YOURAPP/static/
cp welcome/controllers/appadmin.py  YOURAPP/controllers/
cp -R welcome/views/* YOURAPP/views/

------------------------------------------------------------------

Richard Vézina

unread,
Aug 15, 2017, 12:18:44 PM8/15/17
to web2py-users
Yes all these files from welcome should be updated... Before you must make a backup of your app just to make sure it don't break anything...

Richard

Richard Vézina

unread,
Aug 15, 2017, 12:50:02 PM8/15/17
to web2py-users

Richard Vézina

unread,
Aug 15, 2017, 1:20:54 PM8/15/17
to web2py-users
I send a PR to web2py book to include the Gist in Upgrading section...
Reply all
Reply to author
Forward
0 new messages