STINNER Victor added the comment: Here is a patch to not import again the io module in _Py_DisplaySourceLine() if the module was unloaded.
A simpler patch is to just return (don't check sys.modules) if _Py_Finalizing is set. Note: I also created issue #19424 to avoid conversion from/to UTF-8. ---------- keywords: +patch Added file: http://bugs.python.org/file32396/traceback_finalize.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue19421> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com