-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Module import fails if a directory exists with same name #7229
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Also interesting - notice how if we add a Although I don't think this is a problem, and not a "failure" of module importing. These are just different ways to handle import ordering. |
Another manifestation is this: $ upython
MicroPython v1.14-128-gca3d51f12-dirty on 2021-03-31; linux version
Use Ctrl-D to exit, Ctrl-E for paste mode
>>> from foo import bar
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: no module named 'foo.bar'
>>> Again this works OK in CPython. It seems that MP assumes that the directory I'm agnostic as to whether this issue is fixed or documented. |
RP2040: have clock start high when SPI polarity high
Tested under Unix and RP2.
To replicate create a directory (e.g. ~/test) containing
foo.py
:Import behaves as expected. CPython behaves identically.:
Create a subdirectory
foo
and repeat:CPython correctly imports the module:
The text was updated successfully, but these errors were encountered: