You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
File "C:\Users\alfred\AppData\Local\Programs\Python\Python311\Lib\tkinter\__init__.py", line 861, in callit
func(*args)
File "C:\dat\Python\testing\c.ai-py.py", line 20, in chat
data = client.chat.send_message(cid, message)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\alfred\AppData\Local\Programs\Python\Python311\Lib\site-packages\characterai\characterai.py", line 144, in send_message
return json.loads('{"replies": ' + response.split(r'{"replies": ')[-1])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\alfred\AppData\Local\Programs\Python\Python311\Lib\json\__init__.py", line 346, in loads
return _default_decoder.decode(s)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\alfred\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\alfred\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 13 (char 12)
strangely, this error doesn't occur when the message has to wait for Cloudflare or when its the first message sent to the library.
EDIT: I set the library to print the output so that I could attempt to find out what was wrong. When the error was thrown, this was the output, which is definitely not JSON:
<html><head><title>Internal Server Error</title></head><body><h1><p>Internal Server Error</p></h1><scriptdefersrc="https://static.cloudflareinsights.com/beacon.min.js/v52afc6f149f6479b8c77fa569edb01181681764108816" integrity="sha512-jGCTpDpBAYDGNYR5ztKt4BQPGef1P0giN6ZGVUi835kFF88FOmmn8jBQWNgrNd8g/Yu421NdgWhwQoaOPFflDw==" data-cf-beacon='{"rayId":"7ca3fd09cb924126","token":"de6c8a8324c04a50b30bdeb96bc8d410","version":"2023.4.0","si":100}' crossorigin="anonymous"></script></body></html>
From the above output, I assume that something is wrong with either the way the library fetches data or just server errors on c.ai's side, although I can use the site normally so I'm leaning towards the former.
The text was updated successfully, but these errors were encountered:
code:
strangely, this error doesn't occur when the message has to wait for Cloudflare or when its the first message sent to the library.
EDIT: I set the library to print the output so that I could attempt to find out what was wrong. When the error was thrown, this was the output, which is definitely not JSON:
From the above output, I assume that something is wrong with either the way the library fetches data or just server errors on c.ai's side, although I can use the site normally so I'm leaning towards the former.
The text was updated successfully, but these errors were encountered: