[New-bugs-announce] [issue28375] cgi.py spam in Apache server logs

Sebastian Rittau report at bugs.python.org
Thu Oct 6 08:00:23 EDT 2016


New submission from Sebastian Rittau:

I am using cgi.py in WSGI applications, using Apache and mod_wsgi. Unfortunately cgi.py keeps spamming the error log with messages like the following:

Exception ignored in: <bound method FieldStorage.__del__ of FieldStorage(None, None, [])>
Traceback (most recent call last):
  File "/usr/lib/python3.5/cgi.py", line 566, in __del__
NameError: name 'AttributeError' is not defined

This is mostly likely due to the warning about __del__ in <https://docs.python.org/3/reference/datamodel.html>, i.e. AttributeError will already have been cleaned at the time FieldStorage is collected. One workaround that seems to work for me is to cache AttributeError in the constructor of FieldStorage in self and use that attribute during __del__.

----------
messages: 278186
nosy: srittau
priority: normal
severity: normal
status: open
title: cgi.py spam in Apache server logs
versions: Python 3.5

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue28375>
_______________________________________


More information about the New-bugs-announce mailing list