Mark Erbaugh
unread,Mar 6, 2018, 6:40:28 PM3/6/18Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to web2py-users
I installed Web2py and Apache on a Raspberry Pi using the Ubuntu installation script. That script generated a self-signed SSL certificate.
If I access the app using HTTP on port 80 and HTTPS on port 443, all is fine.
This app is replacing a legacy app that needs to run HTTP on port 8080. I reconfigured Apache's ports.conf to listen on 8080 and default.conf to have a virtualhost on 8080.
The app works fine if I access it only via HTTP on port 8080 or HTTPS on port 443, but if you try to access it from the other port (443 if the first access after an Apache restart was on 8080 or 8080 if the first access was on 443), I get an error ticket. Clicking on the error ticket just leads to another ticket.
I copied the error file to another Web2py server and here's the traceback:
Traceback (most recent call last):
File "/home/www-data/web2py/gluon/main.py", line 434, in wsgibase
session.connect(request, response)
File "/home/www-data/web2py/gluon/globals.py", line 1000, in connect
session_pickled = pickle.dumps(self, pickle.HIGHEST_PROTOCOL)
File "/home/www-data/web2py/gluon/storage.py", line 52, in <lambda>
__getnewargs__ = lambda self: getattr(dict,self).__getnewargs__(self)
TypeError: getattr(): attribute name must be string
I think Web2py is having problems pickling the Session object. I added a diagnostic printout and when the pickle is failing the Session object prints as Storage({}), which I assume is an empty object. However, working with the diagnostic printout, I also see cases where an empty object pickles just fine, just not ones generated when I switched ports.