Skip to content
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

Resolve Import Issue for 'import {component_to_import}' Style #94

Open
DeleMike opened this issue Sep 17, 2023 · 0 comments
Open

Resolve Import Issue for 'import {component_to_import}' Style #94

DeleMike opened this issue Sep 17, 2023 · 0 comments

Comments

@DeleMike
Copy link
Contributor

Initially, the code utilizes relative imports such as from ..store import store or from test_application.parent import parent but when attempting to switch to a particular import style like import store a ModuleNotFoundError arises

Something like this:

Traceback (most recent call last):
  File "/home/xxxx/software_eng/starfyre/test_application/build/__main__.py", line 40, in generate_pages
    module = importlib.import_module(module_name)
  File "/usr/local/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/home/xxxx/software_eng/starfyre/test_application/build/pages/__init__.py", line 2, in <module>
    import store
ModuleNotFoundError: No module named 'store'

View this discussion for more info

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant