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

ModuleNotFoundError: No module named 'alembic.autogenerate' #4502

Open
jtpark77 opened this issue Dec 9, 2024 · 5 comments
Open

ModuleNotFoundError: No module named 'alembic.autogenerate' #4502

jtpark77 opened this issue Dec 9, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@jtpark77
Copy link

jtpark77 commented Dec 9, 2024

Describe the bug
When I run reflex run, the following error occurs.

ModuleNotFoundError: No module named 'alembic.autogenerate'`

To Reproduce

> reflex run

Expected behavior
No Exception

Screenshots
None

Specifics (please complete the following information):

  • Python Version: 3.11
  • Reflex Version: 0.6.6.post2
  • OS: ubuntu 24.04
  • Browser (Optional): Chrome

Additional context
The exception that occurred

reflex run
Traceback (most recent call last):
  File "/home/opt/conda/envs/portal-v4/lib/python3.11/site-packages/reflex/config.py", line 864, in get_config
    return _get_config()
           ^^^^^^^^^^^^^
  File "/home/opt/conda/envs/portal-v4/lib/python3.11/site-packages/reflex/config.py", line 833, in _get_config
    rxconfig = importlib.import_module(constants.Config.MODULE)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/opt/conda/envs/portal-v4/lib/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/mnt/data/repos/ai/lml/portal-v4/rxconfig.py", line 3, in <module>
    from aiportal.styles.tailwind_config import tw_config
  File "/mnt/data/repos/ai/lml/portal-v4/aiportal/styles/__init__.py", line 7, in <module>
    from .styles import *
  File "/mnt/data/repos/ai/lml/portal-v4/aiportal/styles/styles.py", line 28, in <module>
    rx.heading: {
    ^^^^^^^^^^
  File "/home/opt/conda/envs/portal-v4/lib/python3.11/site-packages/reflex/__init__.py", line 385, in __getattr__
    return getattr(name)
           ^^^^^^^^^^^^^
  File "/home/opt/conda/envs/portal-v4/lib/python3.11/site-packages/lazy_loader/__init__.py", line 82, in __getattr__
    submod = importlib.import_module(submod_path)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/opt/conda/envs/portal-v4/lib/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/opt/conda/envs/portal-v4/lib/python3.11/site-packages/reflex/components/radix/themes/typography/heading.py", line 10, in <module>
    from reflex.components.markdown.markdown import MarkdownComponentMap
  File "/home/opt/conda/envs/portal-v4/lib/python3.11/site-packages/reflex/components/markdown/__init__.py", line 3, in <module>
    from .markdown import Markdown
  File "/home/opt/conda/envs/portal-v4/lib/python3.11/site-packages/reflex/components/markdown/markdown.py", line 11, in <module>
    from reflex.components.component import Component, CustomComponent
  File "/home/opt/conda/envs/portal-v4/lib/python3.11/site-packages/reflex/components/component.py", line 26, in <module>
    import reflex.state
  File "/home/opt/conda/envs/portal-v4/lib/python3.11/site-packages/reflex/state.py", line 49, in <module>
    from reflex.model import Model
  File "/home/opt/conda/envs/portal-v4/lib/python3.11/site-packages/reflex/model.py", line 8, in <module>
    import alembic.autogenerate
ModuleNotFoundError: No module named 'alembic.autogenerate'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/opt/conda/envs/portal-v4/bin/reflex", line 5, in <module>
    from reflex.reflex import cli
  File "/home/opt/conda/envs/portal-v4/lib/python3.11/site-packages/reflex/reflex.py", line 16, in <module>
    from reflex.custom_components.custom_components import custom_components_cli
  File "/home/opt/conda/envs/portal-v4/lib/python3.11/site-packages/reflex/custom_components/custom_components.py", line 24, in <module>
    config = get_config()
             ^^^^^^^^^^^^
  File "/home/opt/conda/envs/portal-v4/lib/python3.11/site-packages/reflex/config.py", line 868, in get_config
    return _get_config()
           ^^^^^^^^^^^^^
  File "/home/opt/conda/envs/portal-v4/lib/python3.11/site-packages/reflex/config.py", line 833, in _get_config
    rxconfig = importlib.import_module(constants.Config.MODULE)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/opt/conda/envs/portal-v4/lib/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/mnt/data/repos/ai/lml/portal-v4/rxconfig.py", line 3, in <module>
    from aiportal.styles.tailwind_config import tw_config
  File "/mnt/data/repos/ai/lml/portal-v4/aiportal/styles/__init__.py", line 7, in <module>
    from .styles import *
  File "/mnt/data/repos/ai/lml/portal-v4/aiportal/styles/styles.py", line 28, in <module>
    rx.heading: {
    ^^^^^^^^^^
  File "/home/opt/conda/envs/portal-v4/lib/python3.11/site-packages/reflex/__init__.py", line 385, in __getattr__
    return getattr(name)
           ^^^^^^^^^^^^^
  File "/home/opt/conda/envs/portal-v4/lib/python3.11/site-packages/lazy_loader/__init__.py", line 82, in __getattr__
    submod = importlib.import_module(submod_path)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/opt/conda/envs/portal-v4/lib/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/opt/conda/envs/portal-v4/lib/python3.11/site-packages/reflex/components/radix/themes/typography/heading.py", line 10, in <module>
    from reflex.components.markdown.markdown import MarkdownComponentMap
  File "/home/opt/conda/envs/portal-v4/lib/python3.11/site-packages/reflex/components/markdown/__init__.py", line 3, in <module>
    from .markdown import Markdown
  File "/home/opt/conda/envs/portal-v4/lib/python3.11/site-packages/reflex/components/markdown/markdown.py", line 11, in <module>
    from reflex.components.component import Component, CustomComponent
  File "/home/opt/conda/envs/portal-v4/lib/python3.11/site-packages/reflex/components/component.py", line 26, in <module>
    import reflex.state
  File "/home/opt/conda/envs/portal-v4/lib/python3.11/site-packages/reflex/state.py", line 49, in <module>
    from reflex.model import Model
  File "/home/opt/conda/envs/portal-v4/lib/python3.11/site-packages/reflex/model.py", line 8, in <module>
    import alembic.autogenerate
ModuleNotFoundError: No module named 'alembic.autogenerate'
Copy link

linear bot commented Dec 9, 2024

@ElijahAhianyo
Copy link
Collaborator

what is the output of when you run pip freeze | grep alembic

@Lendemor Lendemor added the bug Something isn't working label Dec 9, 2024
@jtpark77
Copy link
Author

jtpark77 commented Dec 9, 2024

pip freze | grep alembic
alembic==1.14.0

@ruhz3
Copy link
Contributor

ruhz3 commented Dec 11, 2024

Upgrading to version 0.6.6 gives me the same error.

@ruhz3
Copy link
Contributor

ruhz3 commented Dec 20, 2024

And this issue no longer occurs in version 0.6.7.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants