no attribute "UserCreate"

#252 · closed · 2 comments

View on GitHub ↗

Evgeniy-Developer-droid

Hi I use next command for create project but I got error `fastapi_template --name project --api-type rest --db postgresql --orm sqlalchemy --ci github --redis --add_users --migrations --dummy --routers --swagger --loguru --gunicorn --cookie-auth --jwt-auth --quiet` ``` Removing resources for disabled feature GraphQL API... Removing resources for disabled feature Kafka support... Removing resources for disabled feature NATS support... Removing resources for disabled feature Gitlab CI... Removing resources for disabled feature Tortoise ORM... Removing resources for disabled feature Ormar ORM... Removing resources for disabled feature PsycoPG... Removing resources for disabled feature Piccolo... Removing resources for disabled feature Beanie... Removing resources for disabled feature MySQL DB... Removing resources for disabled feature SQLite DB... Removing resources for disabled feature Opentelemetry support... Removing resources for disabled feature Taskiq support... cleanup complete! ⭐ Placing resources nicely in your new project ⭐ Resources are happy to be where they are needed the most.  Git repository initialized 🐍 Installing python dpendencies with UV 📚🖌️📄📏 Tidying up the project 🚀Creating your first commit ==================== WARNING ===================== [WARN] Command `git commit -m 'Initial commit'` was not successfull. Check output below. However, the project was generated. So it could be a false-positive. Format with Ruff.........................................................Passed Check with Ruff..........................................................Passed Validate types with MyPy.................................................Failed - hook id: mypy - exit code: 1 warning: `VIRTUAL_ENV=/home/nick/Projects/audio_to_action/venv` does not match the project environment path `.venv` and will be ignored; use `--active` to target the active environment instead project/web/api/users/views.py:3: error: Module "project.db.models.users" has no attribute "UserCreate" [attr-defined] from project.db.models.users import ( ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ project/web/api/users/views.py:3: error: Module "project.db.models.users" has no attribute "UserRead" [attr-defined] from project.db.models.users import ( ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ project/web/api/users/views.py:3: error: Module "project.db.models.users" has no attribute "UserUpdate" [attr-defined] from project.db.models.users import ( ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ project/web/api/users/views.py:3: error: Module "project.db.models.users" has no attribute "api_users" [attr-defined] from project.db.models.users import ( ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ project/web/api/users/views.py:3: error: Module "project.db.models.users" has no attribute "auth_cookie" [attr-defined] from project.db.models.users import ( ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ project/web/api/users/views.py:3: error: Module "project.db.models.users" has no attribute "auth_jwt" [attr-defined] from project.db.models.users import ( ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Found 6 errors in 1 file (checked 56 source files) ```

Comments

s3rius

I made a pull requests that fixes fastapi-users integraiton and behavior when project got deleted on unsuccessfull pre-commit run. Will be released today.

s3rius

Appeared in 6.1.2.