Replies: 7 comments
-
It would be helpful to see error messages. |
Beta Was this translation helpful? Give feedback.
-
there is no error message, just a "INFO: ('127.0.0.1', 54213) - "POST /users/me/ HTTP/1.1" 500" message on prompt |
Beta Was this translation helpful? Give feedback.
-
Add |
Beta Was this translation helpful? Give feedback.
-
Also, if you use |
Beta Was this translation helpful? Give feedback.
-
Thanks @dmontagu! @marcosmmb were you able to solve your problem? |
Beta Was this translation helpful? Give feedback.
-
@tiangolo actually, no. I have tried many times but I'm not able to debug. I have tried in more than one project to use this new Config class, just like documentation, but I was not able to solve it. For now, I'm just using version 0.29.1, that's the latest one that works without these settings. Btw, it will just respond with a "code 500 internal server error", and even try/except won't help me. |
Beta Was this translation helpful? Give feedback.
-
@marcosmmb if you still have problems, please follow the tutorial for SQL in full: https://fastapi.tiangolo.com/tutorial/sql-databases/ , writing the code exactly as in the tutorial. And see if it works for you. If it doesn't, then there's probably an error in your environment. If it works, you might see what's different from your app code. After that, if you still have issues, please create a simple, small, self-contained app that shows the error. For example, using only FastAPI and SQLAlchemy with a SQLite DB. |
Beta Was this translation helpful? Give feedback.
-
So I've followed the documentation to fix a problem with response_model when I return a database object.
It still won't work and I receive an error 500 on my API.
Downgraded to fastapi==0.29.1 and it works just as expected. What am I doing wrong?
Beta Was this translation helpful? Give feedback.
All reactions