New submission from Raymond Hettinger <raymond.hettin...@gmail.com>:

I think we can do better than the following:

$ python3.8 -m unicode_math_symbols.py
/Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8: Error while 
finding module specification for 'unicode_math_symbols.py' 
(ModuleNotFoundError: __path__ attribute not found on 'unicode_math_symbols' 
while trying to find 'unicode_math_symbols.py')

It is a reasonably common mistake to add .py to the module name for module 
names loaded by the -m command-line launcher.  The error mess is somewhat 
opaque and not suggestive of what the actual problem is or how to fix it.

----------
messages: 365286
nosy: rhettinger
priority: normal
severity: normal
status: open
title: Improve error message for -m option when .py is present
versions: Python 3.8, Python 3.9

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue40108>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to