Skip to content
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

Issues with deployment on Heroku #34

Open
gmkung opened this issue Nov 8, 2023 · 3 comments
Open

Issues with deployment on Heroku #34

gmkung opened this issue Nov 8, 2023 · 3 comments

Comments

@gmkung
Copy link

gmkung commented Nov 8, 2023

I'm experiencing a persistent issue with the package that somehow only manifests when I deploy the app on Heroku.
The JSOn values returned by the API seem to be generating errors during decoding, and I tried with both versions of the packages (Github and pip package from here).

Both works fine when I run it locally though, and the issue with Heroku popped up only in the last few weeks. Anyone faced similar issues and know what could be the problem?

 File "/app/unit_test11.py", line 4, in <module>
    for a in Perplexity().generate_answer(prompt):
             ^^^^^^^^^^^^
  File "/app/.heroku/python/lib/python3.11/site-packages/perplexityai/__init__.py", line 22, in __init__
    self.sid = loads(
               ^^^^^^
  File "/app/.heroku/python/lib/python3.11/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/.heroku/python/lib/python3.11/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/.heroku/python/lib/python3.11/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)
@gmkung gmkung mentioned this issue Nov 8, 2023
@ffanccybear
Copy link

any solutions ?

@LexiestLeszek
Copy link

any solutions yet? I experience the same error with Vercel/Render

@sudhanshu-1316
Copy link

same issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants