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
If I use absolute imports in my code (e.g. import my_module.some_submodules.module_a), then my $PYTHONPATH must be project_folder, so I execute stickytape in this folder and --add-python-path .
However, if instead of importing the submodules directly in main.py, and instead import using importlib.import_module...
...when I run the stickytape script, I get a traceback ending in ModuleNotFoundError: No module named 'my_module'.
Obviously this is a simplified example but it demonstrates the behaviour I'm getting in some software where modules are dynamically imported with importlib in this way. Perhaps it could be possible to add these submodules to stickytape somehow, like how you can specify hidden modules in PyInstaller?
The text was updated successfully, but these errors were encountered:
master now has an option --add-python-module in the CLI to explicitly include Python modules. So, in your example, you'd include --add-python-module my_module.some_submodules.module_a. Does that work for you?
Given a directory structure like this:
If I use absolute imports in my code (e.g.
import my_module.some_submodules.module_a
), then my$PYTHONPATH
must be project_folder, so I execute stickytape in this folder and--add-python-path .
However, if instead of importing the submodules directly in
main.py
, and instead import usingimportlib.import_module
......when I run the stickytape script, I get a traceback ending in
ModuleNotFoundError: No module named 'my_module'
.Obviously this is a simplified example but it demonstrates the behaviour I'm getting in some software where modules are dynamically imported with importlib in this way. Perhaps it could be possible to add these submodules to stickytape somehow, like how you can specify hidden modules in PyInstaller?
The text was updated successfully, but these errors were encountered: