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

Error in accessing "/docs" of Fastapi | FastAPI Prefix & Tags: Part #60 Python API Course #17

Open
khushigarg16 opened this issue Jan 28, 2023 · 0 comments

Comments

@khushigarg16
Copy link

Everything was working fine but when I tried to access ("http://127.0.0.1:8000/docs",) it is giving me this error
Issue in video: https://www.youtube.com/watch?v=4zwUOOrcihk&list=PL8VzFQ8k4U1L5QpSapVEzoSfob-4CR8zM&index=62

INFO:     127.0.0.1:65341 - "GET /docs HTTP/1.1" 200 OK
INFO:     127.0.0.1:65341 - "GET /openapi.json HTTP/1.1" 500 Internal Server Error
ERROR:    Exception in ASGI application
Traceback (most recent call last):
  File "C:\Users\KHUSHI\Desktop\Projects\Fast API\venv\Lib\site-packages\fastapi\encoders.py", line 152, in jsonable_encoder
    data = dict(obj)
           ^^^^^^^^^
TypeError: 'ModelField' object is not iterable

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\KHUSHI\Desktop\Projects\Fast API\venv\Lib\site-packages\fastapi\encoders.py", line 157, in jsonable_encoder
    data = vars(obj)
           ^^^^^^^^^
TypeError: vars() argument must have _dict_ `attribute```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant