[issue39513] NameError: name 'open' is not defined

Serhiy Storchaka report at bugs.python.org
Fri Oct 30 07:59:16 EDT 2020


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

I think this is a multi-level problem, and it perhaps should be solved on different levels separately.

As for logging, it can be used at shutdown by user code, it may help to understand the problem with the user code, and it may work most of time. But if it happen too late, it fails, and the printed traceback does not help but confuses user. The logging module should try the best to help the user. It should be ready to handle such situation. It is not failure of the end user that this error happens, and they cannot do anything in any way, so it is better to suppress the confusion traceback (maybe emit a warning?).

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39513>
_______________________________________


More information about the Python-bugs-list mailing list