[issue14847] AttributeError: NoneType has no attribute 'utf_8_decode'

Jason R. Coombs report at bugs.python.org
Thu Aug 30 23:57:57 CEST 2012


Jason R. Coombs added the comment:

Since my last comment, we've been running with a version of the wrapper (attached) around the main entry point to our application and it has completely eliminated the error. However, while the wrapper does report when a module deletion is requested, it is never triggered (we don't see the word "deletion" anywhere in our logs).

This result leads me to two findings:

1. Merely making a reference to sys.modules was sufficient to prevent the error.
2. Preventing deletion of 'encodings.*' modules is not sufficient (as apparently this doesn't happen in our code).

My next step is going to be to remove the wrapper, so the error exhibits itself again and we can prove that the issue is still present, and then to re-apply the wrapper, but this time only creating a reference to sys.modules (not actually replacing it).

----------
Added file: http://bugs.python.org/file27066/wrapper.py

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


More information about the Python-bugs-list mailing list