[issue41508] Failed to open os.path in Open Module window of IDLE without any error informations
Terry J. Reedy
report at bugs.python.org
Sat Aug 8 07:54:24 EDT 2020
Terry J. Reedy <tjreedy at udel.edu> added the comment:
On Windows 10: when I start 3.7.8 IDLE in Command Prompt with
C:\Users\Terry>py -3.7 -m idlelib
and try Open Module with 'os.path', I get this traceback in Command Prompt.
Exception in Tkinter callback
Traceback (most recent call last):
File "C:\Programs\Python37\lib\tkinter\__init__.py", line 1705, in __call__
return self.func(*args)
File "C:\Programs\Python37\lib\idlelib\query.py", line 148, in ok
entry = self.entry_ok()
File "C:\Programs\Python37\lib\idlelib\query.py", line 218, in entry_ok
file_path = spec.loader.get_filename(name)
File "<frozen importlib._bootstrap_external>", line 406, in _check_name_wrapper
ImportError: loader for ntpath cannot handle os.path
The same action displays ntpath.py in 3.8.5 and 3.9.0b5. Line 219 in query.py is the same as 3.7 query.py line 218 above. I conclude that the problem was a bug in importlib that was fixed more recently than your version of 3.8. Hence closing.
----------
resolution: -> out of date
stage: -> resolved
status: open -> closed
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41508>
_______________________________________
More information about the Python-bugs-list
mailing list