You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last):
File "<stdin>", line 1, in<module>
ModuleNotFoundError: No module named 'orbit.core.orbit_utils.bunch_utils_functions';'orbit.core.orbit_utils' is not a package
The import from module itself works, following is OK:
The way I understand C++ extension modules is that if you want to import that way, you need to declare the submodule as a separate extension module, instead of using PyModule_AddObject
But if you define a separate extension module, I think you can't do
from orbit.core.orbit_utils import bunch_utils_functions
bunch_utils_functions.copyCoordsToInitCoordsAttr()
unless you create a __init__.py under orbit/core/orbit_utils that does from . import copyCoordsToInitCoordsAttr
Currently if a C++ module has a submodule the import is not working properly as the module is not a package.
E.g.
will give
The import from module itself works, following is OK:
Could be done following StackOverflow ?
The text was updated successfully, but these errors were encountered: