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

cannot import name 'BeanieUserDatabase' from 'fastapi_users.db' #1339

Open
SwordPL opened this issue Jan 10, 2024 · 0 comments
Open

cannot import name 'BeanieUserDatabase' from 'fastapi_users.db' #1339

SwordPL opened this issue Jan 10, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@SwordPL
Copy link

SwordPL commented Jan 10, 2024

Describe the bug

ImportError: cannot import name 'BeanieUserDatabase' from 'fastapi_users.db'

To Reproduce

>>> from fastapi_users_db_beanie import BeanieBaseUser
>>> from fastapi_users import db
>>> db
<module 'fastapi_users.db' from 'C:\\Users\\user\\AppData\\Local\\pypoetry\\Cache\\virtualenvs\\aspect-weaver-backend-IEifFoga-py3.11\\Lib\\site-packages\\fastapi_users\\db\\__init__.py'>
>>> from fastapi_users.db import BeanieUserDatabase, ObjectIDIDMixin
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: cannot import name 'BeanieUserDatabase' from 'fastapi_users.db' (C:\Users\user\AppData\Local\pypoetry\Cache\virtualenvs\aspect-weaver-backend-IEifFoga-py3.11\Lib\site-packages\fastapi_users\db\__init__.py)

Expected behavior

The order of operations should not introduce circular dependencies.

Configuration

  • Python version : 3.11.7
  • FastAPI version : fastapi = "^0.108.0"
  • FastAPI Users version : fastapi-users = {extras = ["beanie", "oauth"], version = "^12.1.2"}

Additional context

Add any other context about the problem here.

@SwordPL SwordPL added the bug Something isn't working label Jan 10, 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

1 participant