snowby666 / poe-api-wrapper

👾 A Python API wrapper for Poe.com. With this, you will have free access to GPT-4, Claude, Llama, Gemini, Mistral and more! 🚀
https://pypi.org/project/poe-api-wrapper/
GNU General Public License v3.0
687 stars 82 forks source link

json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) #99

Closed shawnWXN closed 2 weeks ago

shawnWXN commented 5 months ago
>>> from poe_api_wrapper import PoeApi
>>> client = PoeApi("BngWPT8UUE****WdhMvwg==", proxy=True)  # Poe cookies
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/ubuntu/miniconda3/envs/python3.9/lib/python3.9/site-packages/poe_api_wrapper/api.py", line 146, in __init__
    self.get_channel_settings()
  File "/home/ubuntu/miniconda3/envs/python3.9/lib/python3.9/site-packages/poe_api_wrapper/api.py", line 199, in get_channel_settings
    response_json = self.client.get(f'{self.BASE_URL}/poe_api/settings', headers=self.HEADERS, follow_redirects=True).json()
  File "/home/ubuntu/miniconda3/envs/python3.9/lib/python3.9/site-packages/httpx/_models.py", line 761, in json
    return jsonlib.loads(self.content, **kwargs)
  File "/home/ubuntu/miniconda3/envs/python3.9/lib/python3.9/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
  File "/home/ubuntu/miniconda3/envs/python3.9/lib/python3.9/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/home/ubuntu/miniconda3/envs/python3.9/lib/python3.9/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)
>>> client = PoeApi("m_oJTNezS****TelxGHQ==", proxy=True)  # Quora cookies
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/ubuntu/miniconda3/envs/python3.9/lib/python3.9/site-packages/poe_api_wrapper/api.py", line 146, in __init__
    self.get_channel_settings()
  File "/home/ubuntu/miniconda3/envs/python3.9/lib/python3.9/site-packages/poe_api_wrapper/api.py", line 199, in get_channel_settings
    response_json = self.client.get(f'{self.BASE_URL}/poe_api/settings', headers=self.HEADERS, follow_redirects=True).json()
  File "/home/ubuntu/miniconda3/envs/python3.9/lib/python3.9/site-packages/httpx/_models.py", line 761, in json
    return jsonlib.loads(self.content, **kwargs)
  File "/home/ubuntu/miniconda3/envs/python3.9/lib/python3.9/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
  File "/home/ubuntu/miniconda3/envs/python3.9/lib/python3.9/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/home/ubuntu/miniconda3/envs/python3.9/lib/python3.9/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)
31702160136 commented 5 months ago

一样

XenocodeRCE commented 5 months ago

Hello, it would be better to print the data before calling json.load so we could see whats wrong :)

elinalai0000 commented 5 months ago

image image

RyanXie123 commented 5 months ago

the same

YogeLiu commented 4 months ago

why the status code is 403? The token has copied from the poe.com

31702160136 commented 4 months ago

这是来自QQ邮箱的假期自动回复邮件。   您好,我最近正在休假中,无法亲自回复您的邮件。我将在假期结束后,尽快给您回复。

benngaihk commented 1 month ago

same

31702160136 commented 1 month ago

这是来自QQ邮箱的假期自动回复邮件。   您好,我最近正在休假中,无法亲自回复您的邮件。我将在假期结束后,尽快给您回复。