-
Notifications
You must be signed in to change notification settings - Fork 58
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
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) #58
Comments
I have taken the latest version |
me too |
I have a workaround but kept running into issues. Feel free to troubleshoot further, but I think I'm just gonna look for alternatives to perplexity with how many problems keep appearing. Some necessary dependencies:
In perplexityai\init.py:
Same file in Perplexity's class constructor. Replace the response = (... line with this code block
Basically it uses a headless browser to pass some security checks then filters the pulled html for the actual JSON with regex. |
👦: hai
Traceback (most recent call last):
File "d:\Working on\ml\research\test.py", line 956, in
for a in Perplexity().generate_answer(prompt):
^^^^^^^^^^^^
File "d:\Working on\ml\research\research\Lib\site-packages\perplexityai_init_.py", line 25, in init
self.sid = loads(response)["sid"]
^^^^^^^^^^^^^^^
return _default_decoder.decode(s)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\alok.r\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\alok.r\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)
The text was updated successfully, but these errors were encountered: