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
ImportError: cannot import name 'UJSONResponse' #2193
Comments
@creatorrr thanks for opening this issue. I was unable to recreate the error. I tried a simple handler like this: from starlette.responses import Response
class Handler:
def __init__(self, config):
pass
def handle_post(self, payload, query_params):
return Response("ok") Do you mind creating a minimal example which reproduces the error? Perhaps it has to do with the contents of your |
It’s happening with starlette==0.14.2 but goes away with starlette==0.14.0 |
Yes, and it also seems to work by default if |
Using a library that depends on |
Yes, that makes sense. Have you attempted pinning startlette and fastapi to the appropriate versions? E.g. # requirements.txt
fastap==0.65.1
starlette==0.14.2 |
Yes that works (pinning |
Awesome! Yes, we will look into documenting this. |
Version
cli version: 0.35.0
Description
Using
starlette.responses.Response
throws error on local debug runConfiguration
relevant
cortex.yaml
:Stack traces
(error output from
cortex logs <api name>
)Suggested solution
This bug is due to an older version of starlette. Was fixed in tiangolo/fastapi#2342
The text was updated successfully, but these errors were encountered: