File "/Users/apple/opt/anaconda3/envs/rena-sanic-39/lib/python3.9/site-packages/mistralai/client_base.py", line 137, in _check_response_status_codes
message=f"Status: {response.status_code}. Message: {response.text}",
File "/Users/apple/opt/anaconda3/envs/rena-sanic-39/lib/python3.9/site-packages/httpx/_models.py", line 573, in text
content = self.content
File "/Users/apple/opt/anaconda3/envs/rena-sanic-39/lib/python3.9/site-packages/httpx/_models.py", line 567, in content
raise ResponseNotRead()
httpx.ResponseNotRead: Attempted to access streaming response content, without having called read().
In all of the following constructors to the exception, there is a error calling response.text:
async def _check_response_status_codes(self, response: Response) -> None: if response.status_code in RETRY_STATUS_CODES: raise MistralAPIStatusException.from_response( response, message=f"Status: {response.status_code}. Message: {response.text}", ) elif 400 <= response.status_code < 500: if response.stream: await response.aread() raise MistralAPIException.from_response( response, message=f"Status: {response.status_code}. Message: {response.text}", ) elif response.status_code >= 500: if response.stream: await response.aread() raise MistralException( message=f"Status: {response.status_code}. Message: {response.text}", )
File "/Users/apple/opt/anaconda3/envs/rena-sanic-39/lib/python3.9/site-packages/mistralai/client_base.py", line 137, in _check_response_status_codes message=f"Status: {response.status_code}. Message: {response.text}", File "/Users/apple/opt/anaconda3/envs/rena-sanic-39/lib/python3.9/site-packages/httpx/_models.py", line 573, in text content = self.content File "/Users/apple/opt/anaconda3/envs/rena-sanic-39/lib/python3.9/site-packages/httpx/_models.py", line 567, in content raise ResponseNotRead() httpx.ResponseNotRead: Attempted to access streaming response content, without having called
read()
.