No JSON object could be decoded
- Dominant language
- Python
- Stars
- 827
- Forks
- 189
- PR merge metrics
- No merged PRs in 30d
Description
>>> from line import LineClient
>>> client = LineClient("ID", "pass")
Traceback (most recent call last):
File "", line 1, in
File "line/client.py", line 88, in __init__
self.login()
File "line/api.py", line 88, in login
j = self._get_json(self.LINE_SESSION_LINE_URL)
File "line/api.py", line 335, in _get_json
return json.loads(self._session.get(url, headers=self._headers).text)
File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/__init__.py", line 339, in loads
return _default_decoder.decode(s)
File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 364, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 382, in raw_decode
raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with line/api.py at login and _get_json, where the traceback shows the response is passed to json.loads. Reproduce the LineClient("ID", "pass") login and inspect the session response before decoding it. Done means the reported login failure is understood and the client no longer raises this JSON-decoding error for the supported response.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100