I am facing perhaps a similar issue when I try to get my web2py (Version 2.5.1-stable+timestamp.2013.06.06.15.39.19) application running on a tablet with Android 4.3 and sl4a (python 2.6). GETs seems to be okay but POSTs (e.g. login as user) result in tickets. As any attempt to login results in tickets and is unsuccessful finally the content of tickets is not displayed in the browser but I manged to extract the complain:
"(self=FieldStorage(None, None, ''))"
'read_lines_to_outerboundary'
'Python 2.6.2: /data/user/0/com.googlecode.pythonforandroid/files/python/bin/python (prefix: /data/user/0/com.googlecode.pythonforandroid/files/python)'
"<type 'exceptions.IOError'>"
'Tue Sep 10 08:25:09 2013'
'delim'
"''"
"FieldStorage(None, None, '')"
"'-----------------------------53628658412953322821182323057--'"
'True'
"'-----------------------------53628658412953322821182323057'"
'Traceback (most recent call last):
File "/storage/emulated/legacy/sl4a/scripts/web2py/gluon/main.py", line 533, in wsgibase
parse_get_post_vars(request, environ)
File "/storage/emulated/legacy/sl4a/scripts/web2py/gluon/main.py", line 348, in parse_get_post_vars
dpost = cgi.FieldStorage(fp=body, environ=environ, keep_blank_values=1)
File "/storage/emulated/legacy/sl4a/scripts/web2py/cgi.py", line 508, in __init__
self.read_multi(environ, keep_blank_values, strict_parsing)
File "/storage/emulated/legacy/sl4a/scripts/web2py/cgi.py", line 632, in read_multi
environ, keep_blank_values, strict_parsing)
File "/storage/emulated/legacy/sl4a/scripts/web2py/cgi.py", line 510, in __init__
self.read_single()
File "/storage/emulated/legacy/sl4a/scripts/web2py/cgi.py", line 647, in read_single
self.read_lines()
File "/storage/emulated/legacy/sl4a/scripts/web2py/cgi.py", line 669, in read_lines
self.read_lines_to_outerboundary()
File "/storage/emulated/legacy/sl4a/scripts/web2py/cgi.py", line 698, in read_lines_to_outerboundary
line = self.fp.readline(1<<16)
IOError: [Errno 2] No such file or directory
When I add some python code to the cgi module function ' read_lines_to_outerboundary' to inspect self.fp ...
while 1:
print 'DBG: fp -> %s' % str(self.fp)
line = self.fp.readline(1<<16)
if not line:
self.done = -1
break
... I get the following:
DBG: fp -> <open file '<fdopen>', mode 'w+b' at 0x40b41ed0>
Any help or hints how to track down the root cause of this issue are appreciated very much.
Regards,
Michael