Closed SeRealMF closed 10 months ago
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.
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.
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.
After merging #309, does this issue persist? Could you check this @SeRealMF and close this issue if the problem is fixed?
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.
Again, in my case all those notes apply only to Windows. No problems on Linux.
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: