[New-bugs-announce] [issue31300] Traceback prints different code than the running module

Aigars Mahinovs report at bugs.python.org
Tue Aug 29 07:03:31 EDT 2017


New submission from Aigars Mahinovs:

If you run a longer running Python program, then change the Python module that it loaded on disk and then cause a traceback to happen in the code in that module, then the traceback may be nonsensical as it will reference line numbers from the module in memory, but print code from the same line numbers from the file on disk, even if they are different.

In any case there should be a prominent warning on traceback if the module in memory does not match the module on disk, but ideally the traceback print should show the code in memory - the actual code that caused the problem.

----------
components: Library (Lib)
messages: 300980
nosy: Aigars Mahinovs
priority: normal
severity: normal
status: open
title: Traceback prints different code than the running module
type: behavior
versions: Python 3.6

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


More information about the New-bugs-announce mailing list