Stefan Seefeld added the comment: Some further experiements:
Replacing the `exec(f.read(), env)` line by ``` code = compile(f.read(), 'script', 'exec') exec(code, env) ``` exhibits the same behaviour. If I remove the `try...except`, the correct (full) traceback is printed out. So it looks like the issue is with the traceback propagation through exception handlers when the error happens during parsing. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue30496> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com