You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Under python 3 and the latest repository, browsing to http://127.0.0.1:8000/welcome/favicon.ico causes streamer.py to crash because it treats the IOError exception in a non-python3 compatible way. The IOError exception occurs because favicon.ico is not found at / . No error ticket is generated.
except IOError as e:
if e[0] == errno.EISDIR:
raise HTTP(403, error_message, web2py_error='file is a directory')
elif e[0] == errno.EACCES:
raise HTTP(403, error_message, web2py_error='inaccessible file')
else:
raise HTTP(404, error_message, web2py_error='invalid file')
This works in python 2, but e[0] should be accesed as e.errno under python 3
Partial stack trace:
Traceback (most recent call last):
File "C:\web2py\gluon\main.py", line 329, in wsgibase
response.stream(static_file, request=request)
File "C:\web2py\gluon\globals.py", line 617, in stream
status=self.status)
File "C:\web2py\gluon\streamer.py", line 66, in stream_file_or_304_or_206
if e[0] == errno.EISDIR:
TypeError: 'FileNotFoundError' object is not subscriptable
The text was updated successfully, but these errors were encountered:
Under python 3 and the latest repository, browsing to
http://127.0.0.1:8000/welcome/favicon.ico
causesstreamer.py
to crash because it treats theIOError
exception in a non-python3 compatible way. The IOError exception occurs becausefavicon.ico
is not found at/
. No error ticket is generated.This works in python 2, but
e[0]
should be accesed ase.errno
under python 3Partial stack trace:
The text was updated successfully, but these errors were encountered: