-
Notifications
You must be signed in to change notification settings - Fork 13
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
Importing numpy leads to ModuleNotFoundError #270
Comments
This is very rare use-case. In general, I'd like to add leading underscore to module local imports, then these things shouldn't happen. |
I was not able to reproduce this error at all. Even with a completely clean environment. |
I was successfully able to reproduce the error, though only on Windows, not on Linux. There may also be many other factors that influence whether the error appears or not. |
Would still happen with json as it has the same name as built-in module. For this one, we will have to add a trailing underscore. You can add this to #296. |
The issue still persists, even with the latest changes. @j042 mentioned a trailing underscore, though the issue seems resolved in my opinion with a leading underscore of json.py. No errors occur when the file is named _json.py. |
When executing npz.py in splinepy/io a ModuleNotFoundError will be raised.
This is because of the following line of code:
import numpy as np
Numpy is using json but because of the fact that json.py is another file in the splinepy/io folder, it will therefore execute this file instead.
This leads to the following error message:
The text was updated successfully, but these errors were encountered: