[issue46324] 'import traceback' Causes a Crash

bichanna report at bugs.python.org
Mon Jan 10 00:35:37 EST 2022


New submission from bichanna <nobu.bichanna at gmail.com>:

I was developing a programming language using Python, and I had a 'token.py' file. After changing the name of the file, the issue was solved.

I am sure that my 'token.py' caused the error.

Here's the traceback I got:
Traceback (most recent call last):
  File "/some/path/main.py", line 2, in <module>
    from parser import Parser
  File "/some/path/parser.py", line 3, in <module>
    import traceback
  File "/usr/local/Cellar/python at 3.9/3.9.7/Frameworks/Python.framework/Versions/3.9/lib/python3.9/traceback.py", line 5, in <module>
    import linecache
  File "/usr/local/Cellar/python at 3.9/3.9.7/Frameworks/Python.framework/Versions/3.9/lib/python3.9/linecache.py", line 11, in <module>
    import tokenize
  File "/usr/local/Cellar/python at 3.9/3.9.7/Frameworks/Python.framework/Versions/3.9/lib/python3.9/tokenize.py", line 35, in <module>
    from token import EXACT_TOKEN_TYPES
ImportError: cannot import name 'EXACT_TOKEN_TYPES' from 'token' (/some/path/token.py)

----------
components: macOS
messages: 410187
nosy: bichanna, ned.deily, ronaldoussoren
priority: normal
severity: normal
status: open
title: 'import traceback' Causes a Crash
type: crash
versions: Python 3.9

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


More information about the Python-bugs-list mailing list