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

Newbie Attempting to Run Tutorial get Metclass Conflict #3053

Closed
kwmartin opened this issue Apr 9, 2024 · 1 comment
Closed

Newbie Attempting to Run Tutorial get Metclass Conflict #3053

kwmartin opened this issue Apr 9, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@kwmartin
Copy link

kwmartin commented Apr 9, 2024

Ubuntu 22.04, Python 3.10.
Had a lot of pip conflicts but resolved them all except for conflict with nicegui being globally installed, but am guessing this shouldn't matter. Attempting to get started with tutorial failed:

(venv) > reflex init
Traceback (most recent call last):
  File "/home/martin/.local/bin/reflex", line 5, in <module>
    from reflex.reflex import cli
  File "/home/martin/.local/lib/python3.10/site-packages/reflex/reflex.py", line 18, in <module>
    from reflex.custom_components.custom_components import custom_components_cli
  File "/home/martin/.local/lib/python3.10/site-packages/reflex/custom_components/custom_components.py", line 23, in <module>
    from reflex.utils.pyi_generator import PyiGenerator
  File "/home/martin/.local/lib/python3.10/site-packages/reflex/utils/pyi_generator.py", line 26, in <module>
    from reflex.components.component import Component
  File "/home/martin/.local/lib/python3.10/site-packages/reflex/components/__init__.py", line 4, in <module>
    from . import lucide
  File "/home/martin/.local/lib/python3.10/site-packages/reflex/components/lucide/__init__.py", line 3, in <module>
    from .icon import Icon
  File "/home/martin/.local/lib/python3.10/site-packages/reflex/components/lucide/icon.py", line 3, in <module>
    from reflex.components.component import Component
  File "/home/martin/.local/lib/python3.10/site-packages/reflex/components/component.py", line 24, in <module>
    import reflex.state
  File "/home/martin/.local/lib/python3.10/site-packages/reflex/state.py", line 56, in <module>
    from reflex.utils import console, format, prerequisites, types
  File "/home/martin/.local/lib/python3.10/site-packages/reflex/utils/prerequisites.py", line 32, in <module>
    from reflex import constants, model
  File "<frozen importlib._bootstrap>", line 1075, in _handle_fromlist
  File "/home/martin/.local/lib/python3.10/site-packages/reflex/__init__.py", line 224, in __getattr__
    module = importlib.import_module(_MAPPING[name])
  File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "/home/martin/.local/lib/python3.10/site-packages/reflex/model.py", line 136, in <module>
    class Model(Base, sqlmodel.SQLModel):
TypeError: metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases
(venv) > 

Spent some time looking up metaclasses, and inheritance conflicts, but it appears I would have to define a new metaclass in the library to resolve the conflict with sqlmodel, and this can't be the best way to proceed to just getting started with reflex. Any suggestions? Thanks.

@picklelo
Copy link
Contributor

picklelo commented Apr 9, 2024

Thanks for raising - this is resolved in #3026 and will be available soon. Hopefully we can get you unblocked soon with these dependencies.

@Lendemor Lendemor added the bug Something isn't working label Apr 12, 2024
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