HELP!! One click upgrade failed for pythonanywhere site

86 views
Skip to first unread message

Omi Chiba

unread,
Jan 21, 2015, 11:13:17 AM1/21/15
to web...@googlegroups.com
Hi, I clicked the upload on admin and tried to upgrade from 2.4.6 to 2.9.12. As soon as I clicked I got ticket but cannot see the ticket because now I get a ticket to see the ticket... It means I cannot open admin site. My app is still working fine.

I don't where to start to fix. Can you guys help?

I can access web2py folder on pythonanywhere no problem. Worst case, I can delete it and install new and import app which I backup before upgrade.


Paolo Valleri

unread,
Jan 21, 2015, 12:33:14 PM1/21/15
to web...@googlegroups.com
Hi,
since you have access to the file system, can you check the content of the last ticket in the admin error directory?

Paolo

Philip Kilner

unread,
Jan 21, 2015, 12:50:07 PM1/21/15
to web...@googlegroups.com
Hi,
I don't know if this is relevant, but I've trie to upgrade from 2.9.11
to 2.9.12 today in my PythonAnywhere instance, and it's failing with: -

unable to upgrade because "[Errno 2] No such file or directory
'/home/[accname]/web2py/gluon/dal/__init__.py"

....where [accname] is my PytonAnywhere account name.

I've not had time to look into this yet, but I'm not sure why it thinks
that web2py/gluon/dal is a folder.

HTH


--

Regards,

PhilK


'a bell is a cup...until it is struck'

Omi Chiba

unread,
Jan 21, 2015, 12:52:21 PM1/21/15
to web...@googlegroups.com
Thank you for telling me where to star.

The error was "S"<type 'exceptions.ImportError'> cannot import name Config"" I don't know what it means. I attached the entire log. Can you take a look?
199.66.161.38.2015-01-21.16-09-14.4f7a2b46-0f04-4664-a2f2-3c6e98bd42d5

Niphlod

unread,
Jan 21, 2015, 3:11:31 PM1/21/15
to web...@googlegroups.com
IMHO the issue with upgrading in place (always an HARD thing to do) is that the upgrade method doesn't take into consideration to prune the directory BEFORE installing the new version.

When no modules in gluon change (or when things gets added), there is no issue.... however, this time with dal.py becoming dal/__init__.py things ARE GOING to break.

Omi Chiba

unread,
Jan 21, 2015, 3:21:42 PM1/21/15
to web...@googlegroups.com
I was overt-rusting the web2py because it always promise backward compatibility... but this time it's depanding on platform so no complains. Now I failed two upgrade work for both pytonanywhere and my windows 2012 hosting server with apache... I just take one for the team and failed... : )

Niphlod

unread,
Jan 21, 2015, 3:34:24 PM1/21/15
to web...@googlegroups.com
in this case it's not platform-dependency the issue: it's the method web2py uses for the upgrade-in-place.
We should label it CLEARLY as "things can go wrong if you press this button" and live with it: there are just too much moving parts around an upgrade.
Most of the times it works (and it did), but that does not need to imply a fail-proof process.
Things can change, web2py is (most of the times) backwards compatible with app-code but not with apps artifacts coming from different versions , e.g. sessions (or cache) serialization due to speed improvements, and so on... we simply can't afford to live with years-old choices just for the sake of a working in-place upgrade.

Given the build-up of recent-releases crashes/errors/whatnot I dare to say we'd need:
- a "fail-proof" upgrade process documented in the book
- label the infamous button on admin as "experimental" (proposed in the past, but never happened)

It's really damn easy to upgrade web2py knowing its environment...
- stop the webserver (or prepare a new empty folder leaving the old one running)
- prune existing except of applications/ and/or routes.py-logging.conf-etc in the root (or copy applications/ and/or routes.py-logging.conf-etc to the new one)
- unzip new web2py into the root (or the new folder)
- clean sessions/cache folder for every app
- start the webserver (or change the configuration of the webserver to pick up from the new folder)

voilà.

Omi Chiba

unread,
Jan 21, 2015, 3:47:35 PM1/21/15
to web2py-users
Right, I think I just need to delete the app on pythonanywhere, install new web2py from their installer and replace routes.py and my apps.... Hopefully this works.

--
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 a topic in the Google Groups "web2py-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/web2py/eXIt4HaHF44/unsubscribe.
To unsubscribe from this group and all its topics, send an email to web2py+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages