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

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

Closed
3 tasks done
shawnWXN opened this issue Jan 23, 2024 · 8 comments
Closed
3 tasks done

Comments

@shawnWXN
Copy link

  • poe-api-wrapper: 1.3.6
  • python: 3.9.6
  • OS: Ubuntu 20.04.6 LTS
>>> 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
Copy link

一样

@XenocodeRCE
Copy link
Contributor

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

@elinalai0000
Copy link

image
image

@RyanXie123
Copy link

the same

@YogeLiu
Copy link

YogeLiu commented Feb 22, 2024

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

@31702160136
Copy link

31702160136 commented Feb 22, 2024 via email

@benngaihk
Copy link

same

@31702160136
Copy link

31702160136 commented May 10, 2024 via email

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

8 participants