Forums

Web2py admin failure after upgrading to v2.7.3

I was on web2py v2.5.4 and I used the "Upgrade now to Version 2.7.3" button on the admin interface page. I got a 504 timeout error, the web2py files themselves have all got today's date on them, the website (www.appgov.org) still works fine but any access to the admin system (https://www.appgov.org/admin) fails with a ticket saying "Internal error Ticket issued: admin..." and I can't see the contents of the ticket because it just generates another one!

I've tried reloading the app but it didn't make any difference. Any suggestions?

I believe there was a problem in the auto-upgrade button in web2py for the change from 2.6.x to 2.6.x; the previous discussion here has a solution posted by @mattspence.

Giles - that was very helpful. I followed Matt Spence's wonderfully clear instructions in his last post and then reloaded my app. But now I get "Unhandled Exception" on both admin and, to my horror, on my website as well.

I see that this error was also reported on 29 Sep at https://groups.google.com/forum/#!topic/web2py/WxA9OMRgOdo but I can't see what the solution was.

I notice that my error and server logs say OSError: [Errno 2] No such file or directory: '/home/appgov/web2py/a' - but this path does exist.

Any further suggestions? I would very much like to get my website running again asap.

Without looking at your files (which I can do if you tell me I can!) then it's hard to diagnose. But I can see the error logs, and it looks like the error's coming from your WSGI file, which will be somewhere like /var/log/www_yourdomain_com_wsgi.py

Giles - yes please do look at my files! You are right that the WSGI file does specify project_home = u'/home/appgov/web2py/a' but that is how it got set up to begin with using the Dashboard and has been working fine since then. I must admit that I don't know much about setting up web2py and I would be pleased to make any changes needed to get it to work or improve it.

That's strange, I don't know how it could have got that "a" there!

Anyway, if you remove the "a", that will start web2py working again. However, unless I misunderstand what I'm seeing, I think that instead of unzipping the downloaded web2py on top of your existing one, you moved your old one to one side and created a fresh web2py directory. Is that right? If so, you'll just get a default web2py configuration rather than your own site.

Yes, my instructions presume a "standard" install of web2py at /home/username/web2py. Hope you worked it out! I've updated my instructions on the previous discussion, as well.

Quick note:

/var/log/www_yourdomain_com_wsgi.py

was

/var/www/yourdomain_pythonanywhere_com_wsgi.py

for me.

Yup, that makes sense. Basically, you take the hostname of your web app (whether it's www.yourdomain.com or yourusername.pythonanywhere.com), replace dots with underscores, and then add _wsgi.py to the end. That gives you the filename.