Ruu3f / perplexityai

A simple module to use Perplexity AI in Python.
https://pypi.org/project/perplexityai
GNU General Public License v3.0
47 stars 6 forks source link

Expecting value: line 1 column 1 (char 0) #1

Closed Lowlowlowlowlowlow closed 1 year ago

Lowlowlowlowlowlow commented 1 year ago

Details:

(base) root@vultr:~# python demo.py 👦: "hi" 🤖: Expecting value: line 1 column 1 (char 0) 👦:

How to slove it?

Ruu3f commented 1 year ago

Oh, sorry. It likely couldn't get a successful response from perplexity.ai and returned an empty string. I will improve the error handling in the code.

Dima-369 commented 1 year ago

I always get this error message from now. Same on https://github.com/nathanrchn/perplexityai actually.

Does anyone know of a fix?

fire17 commented 1 year ago

please reopen this issue, im getting the same error as @Dima-369

Ruu3f commented 11 months ago

It is fixed now.

Dima-369 commented 11 months ago

It is fixed now.

Amazing, thanks. I can confirm that it works now!

LexiestLeszek commented 9 months ago

I have the same issue, how to fix it? And strangely, I have it when my app is deployed on Vercel/Render, but when I run it locally with Ngrok - it works perfectly.

Dima-369 commented 9 months ago

And strangely, I have it when my app is deployed on Vercel/Render

Is it possible that you have an old version of this repo code installed there? Because locally this also works fine for me.

LexiestLeszek commented 9 months ago

And strangely, I have it when my app is deployed on Vercel/Render

Is it possible that you have an old version of this repo code installed there? Because locally this also works fine for me.

Hey @Dima-369 . It works locally for me as well, the problem that it doesn't work when I deploy it on Vercel/Render/PythonAnywhere.

LexiestLeszek commented 9 months ago

bump, still having it whenever try to deploy app in the internet but with ngrok it works just fine