We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a00655b commit a8c4d44Copy full SHA for a8c4d44
Lib/runpy.py
@@ -135,7 +135,7 @@ def _get_module_details(mod_name, error=ImportError):
135
# pkgutil previously raised ImportError
136
msg = "Error while finding module specification for {!r} ({}: {})"
137
if mod_name.endswith(".py"):
138
- msg += (f". Try using '{mod_name[:-3]}' instead of "
+ msg += (f". Try using '{mod_name[:-3].replace('/', '.')}' instead of "
139
f"'{mod_name}' as the module name.")
140
raise error(msg.format(mod_name, type(ex).__name__, ex)) from ex
141
if spec is None:
0 commit comments