Closed MysticCr1 closed 2 months ago
The JSONDecodeError: Expecting value
indicates that the server response might be empty or not in a valid JSON format. To troubleshoot, consider checking the server's response to identify any issues.
fixed in the new version
im getting this issue with the example code:
Traceback (most recent call last): File "C:/Users/calif/OneDrive/Desktop/skye.py", line 8, in
chat = client.chat.get_chat(char)
File "C:\Users\calif\AppData\Local\Programs\Python\Python311\Lib\site-packages\characterai\characterai.py", line 531, in get_chat
return PyCAI.request(
File "C:\Users\calif\AppData\Local\Programs\Python\Python311\Lib\site-packages\characterai\characterai.py", line 69, in request
data = response.json()
File "C:\Users\calif\AppData\Local\Programs\Python\Python311\Lib\site-packages\tls_client\response.py", line 39, in json
return json.loads(self.text, **kwargs)
File "C:\Users\calif\AppData\Local\Programs\Python\Python311\Lib\json__init__.py", line 346, in loads
return _default_decoder.decode(s)
File "C:\Users\calif\AppData\Local\Programs\Python\Python311\Lib\json\decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "C:\Users\calif\AppData\Local\Programs\Python\Python311\Lib\json\decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)