HELP!! Another upgrading failed for Apache running web2py

231 views
Skip to first unread message

Omi Chiba

unread,
Jan 21, 2015, 12:35:07 PM1/21/15
to web...@googlegroups.com
What a day... this is my second upgrade failure on the same day. This time I was causious and this is hosted windows server I have full control so take all the backup so at least the site is running fine after restoring the older version.

This serve was originally setup using the apache coming with UniServer. (See my blog post)

I was trying to upgrade from 2.4.6 to 2.9.12. 

1. Download the source file from web2py.com and replaced with C:/web2py
2. Added routes.py, parameter_80, 443, 8000.py and customized applications. 
3. Change WSGIScriptAlias path in vhost_web2py.conf  because I noticed the path has been changed.(Oh my got)
WSGIScriptAlias / "C:/web2py/wsgihandler.py"
=> WSGIScriptAlias / "C:/web2py/handlers/wsgihandler.py"

Now, 

1. Open web2py app with apache =>ok
2. Open web2py admin with apache =>NG
3. Open web2py admin without apache (Rocket) =>OK

and this time I found a error log as attached.

It says 'NoneType' object is no callable in gluon/globals.py

Any easy fix or should I report the bug??


error1.jpg
error2.jpg
error3.jpg

Leonel Câmara

unread,
Jan 21, 2015, 2:20:42 PM1/21/15
to web...@googlegroups.com
This error is different from the other one, all you need is to clear the sessions, compiled and cache folders on your apps and everything will be fine.

Omi Chiba

unread,
Jan 21, 2015, 2:40:43 PM1/21/15
to web...@googlegroups.com
The problem occurs for admin app.

Do you mean the clear the sessions folder under web2py\applications\admin? I didn't migrate admin app so this should be all empty from the beginning... or are you talking about apache? 

Omi Chiba

unread,
Jan 21, 2015, 2:44:11 PM1/21/15
to web...@googlegroups.com
>Do you mean the clear the sessions folder under web2py\applications\admin?
I tried it anyway but the same error...

Leonel Câmara

unread,
Jan 21, 2015, 4:42:41 PM1/21/15
to web...@googlegroups.com
Yes, clear for all the apps including admin. Has the admin application been updated too for the new version?

Omi Chiba

unread,
Jan 22, 2015, 10:15:20 AM1/22/15
to web...@googlegroups.com
I just bring the customized app I crated so admin app is from the latest download. No change. Today, I tried fresh install. Download the latest source and run using apache and got the exact same error! So it means the lates web2py doesn't work with apache via wsgi hadler. I need this fixed ASAP.

See attached.
Error.jpg

Leonel Câmara

unread,
Jan 22, 2015, 11:30:02 AM1/22/15
to web...@googlegroups.com
if you go there with your browser in incognito mode does it work?

Omi Chiba

unread,
Jan 22, 2015, 11:39:34 AM1/22/15
to web2py-users
It works!!! and now I can access with or without incognito mode...  but why?? Is this temporarly fix?

On Thu, Jan 22, 2015 at 10:30 AM, Leonel Câmara <leonel...@gmail.com> wrote:
if you go there with your browser in incognito mode does it work?

--
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/yBM8Ybl_xGA/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.

Omi Chiba

unread,
Jan 22, 2015, 11:48:39 AM1/22/15
to web...@googlegroups.com
Um... actually now I got the same error when I access http which I didn't have any problems. So the original problem was I couldn't access with https and now I cannot access with http with any app (Admin, Welcome...etc).


On Thursday, January 22, 2015 at 10:39:34 AM UTC-6, Omi Chiba wrote:
It works!!! and now I can access with or without incognito mode...  but why?? Is this temporarly fix?
On Thu, Jan 22, 2015 at 10:30 AM, Leonel Câmara <leonel...@gmail.com> wrote:
if you go there with your browser in incognito mode does it work?

--
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/yBM8Ybl_xGA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to web2py+unsubscribe@googlegroups.com.

Leonel Câmara

unread,
Jan 22, 2015, 12:35:56 PM1/22/15
to web...@googlegroups.com
Basically you have an old cookie in your browser that's messing things up. Obviously it's also a bug with web2py as it should just discard it if it doesn't have a file for it anymore. But you should be good if you clear your browser cookies and the sessions in the apps.

Omi Chiba

unread,
Jan 22, 2015, 2:14:22 PM1/22/15
to web...@googlegroups.com
Thank you. I posted a ticket for this.

Even I delete session, cookies, hittp or https will get error so the website is useless. I will postpone my upgrade until this fix.

Massimo Di Pierro

unread,
Jan 22, 2015, 6:02:13 PM1/22/15
to web...@googlegroups.com
I am pretty sure that is what web2py does. If sessions are deleted the cookie is ignored. Are these session in cookies?

Omi Chiba

unread,
Jan 22, 2015, 6:27:00 PM1/22/15
to web2py-users
Please see my quick test result below. I'm not sure if it's related to sessions and/or cookies because I always failed when I access with https.

1st test 

1. delete all the cookie on my browser and delete sessions from all the app. 
2. open the website => display welcome app => ok
3. tried to access admin app with https => NG (Same error ticket.)

2nd test

1. delete all the cookie on my browser and delete sessions from all the app. 
2. tried to access admin app with https => NG (Same error ticket.)

3rd Test

1. delete all the cookie on my browser and delete sessions from all the app. 
2. Open browser incognito mode 
3. open the website => display welcome app => ok
4. tried to access admin app with https => NG (Same error ticket.)


--
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/yBM8Ybl_xGA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to web2py+un...@googlegroups.com.

Massimo Di Pierro

unread,
Jan 23, 2015, 12:21:49 AM1/23/15
to web...@googlegroups.com
Did you restart the web server?

I do not think this has anything to do with cookies. This has to do with pickle being None and it cannot be because it is clearly imported. Something very bad happened to your import. Make sure you stop and start again the web server. If you use mod_proxy also stop and start python.
To unsubscribe from this group and all its topics, send an email to web2py+unsubscribe@googlegroups.com.

Omi Chiba

unread,
Jan 23, 2015, 9:54:23 AM1/23/15
to web...@googlegroups.com
Yes. I stop and start apache when I replace web2py folder.

After trouble shooting I found


So any https request become NG for the same error

Then, Restart Apache server


Now all http request become error!!

Then, Restart Apache server Again... all https request become error.

Previous version (2.4.6) is working fine both http and https no problem.


To unsubscribe from this group and all its topics, send an email to web2py+un...@googlegroups.com.

Omi Chiba

unread,
Jan 23, 2015, 10:26:18 AM1/23/15
to web...@googlegroups.com
Um... more weird things. I'm using version 2.4.7 now and I got a similar error when I try to create view.

Version

web2py™Version 2.4.7-stable+timestamp.2013.05.24.17.48.47
PythonPython 2.7.4: C:\UniServer\usr\local\apache2\bin\Apache.exe (prefix: C:\Python27)

Traceback

1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
Traceback (most recent call last):
File "C:\web2py\gluon\main.py", line 606, in wsgibase
session._try_store_in_cookie_or_file(request, response)
File "C:\web2py\gluon\globals.py", line 757, in _try_store_in_cookie_or_file
self._try_store_in_file(request, response)
File "C:\web2py\gluon\globals.py", line 763, in _try_store_in_file
if not response.session_id or self._forget or self._unchanged():
File "C:\web2py\gluon\globals.py", line 719, in _unchanged
session_pickled = cPickle.dumps(dict(self))
File "C:\Python27\Lib\copy_reg.py", line 70, in _reduce_ex
raise TypeError, "can't pickle %s objects" % base.__name__
TypeError: can't pickle function objects

Omi Chiba

unread,
Jan 23, 2015, 11:05:06 AM1/23/15
to web...@googlegroups.com
I mean file is created anyway. It's just a error ticket 

 File "C:\Python27\Lib\copy_reg.py", line 70, in _reduce_ex
    raise TypeError, "can't pickle %s objects" % base.__name__
TypeError: can't pickle function objects

Omi Chiba

unread,
Jan 23, 2015, 4:02:21 PM1/23/15
to web...@googlegroups.com
OK, so I can fix this TypeError: can't pickle function objects error by the solution described here. (Adding AllowOverride None  in apache config file

This solve one problem! So I don't have any problem with web2py 2.4.7 right now,
I was hoping this also solve the problem with 2.9.12 but it doesn't. I got a same error.

The ticket mentioned in the linked forum post is still opened, 

So I think this is related issue which is not solved yet.

Massimo Di Pierro

unread,
Jan 23, 2015, 5:18:03 PM1/23/15
to web...@googlegroups.com
Want to stop by my office next week? I'd like to take a look.
Message has been deleted

Omi Chiba

unread,
Jan 23, 2015, 5:46:08 PM1/23/15
to web...@googlegroups.com
Please delete my previous forum post from your emails.... : )

Niphlod

unread,
Jan 26, 2015, 7:18:29 PM1/26/15
to web...@googlegroups.com
uhm. apache is reaaaaaaaally something nasty when it comes to a few things like

https://code.google.com/p/modwsgi/wiki/ApplicationIssues

and

https://code.google.com/p/modwsgi/wiki/IssuesWithPickleModule

wondering if it's a problem-per-se or not.

cowbert

unread,
Mar 8, 2015, 1:27:45 PM3/8/15
to web...@googlegroups.com
FWIW: I am running web2py 2.9.12 (using source code) on: Apache/2.4.12 (Win32) OpenSSL/1.0.1l mod_wsgi/4.4.6 Python/2.7.9 configured and Windows Server 2008 32-bit without any of the problems indicated by OP.

Specifically:
Apache is from ApacheLounge compiled with VC 9. This is required because mod_wsgi 4.4.6 from Graham Dumpleton's github is compiled using VC 9 and my python 32-bit version from python.org is 2.7.9, which matches the version that mod_wsgi was compiled against. Making sure all versions compiled against same dependencies and by same compiler ensures the best success. See Also: https://github.com/GrahamDumpleton/mod_wsgi/blob/master/win32/README.rst before reporting bugs pertaining to mod_wsgi on Win32.
Reply all
Reply to author
Forward
0 new messages