FastAPI-template icon indicating copy to clipboard operation
FastAPI-template copied to clipboard

ImportError: cannot import name 'auth_cookie'

Open Spirit412 opened this issue 1 year ago • 3 comments
trafficstars

Set up the project without using - [ ] Add authentication via cookie support After launching, I get an error File "/app/src/test_template_api/web/api/users/views.py", line 7, in <module> from test_template_api.db.models.users import auth_cookie # type: ignore ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ImportError: cannot import name 'auth_cookie' from 'test_template_api.db.models.users' (/app/src/test_template_api/db/models/users.py) I deleted line 7 from test_template_api.db.models.users import auth_cookie # type: ignore

After that, the application started without errors

Spirit412 avatar Nov 26 '23 20:11 Spirit412

🤔

Thanks for suggestion. We will take a look.

s3rius avatar Nov 26 '23 21:11 s3rius

The same

david-shiko avatar Mar 04 '24 17:03 david-shiko

Also facing the same issue at "cannot import name 'auth_cookie' from 'basic_app.db.models.users' (D:\NewPC\Playground\python\FastAPI\basic_app\basic_app\db\models\users.py)"

SyedDaniyalHassan avatar Apr 18 '24 07:04 SyedDaniyalHassan