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

ValueError: No JSON object could be decoded #86

Closed
pinkunicorn opened this issue Jun 1, 2020 · 2 comments
Closed

ValueError: No JSON object could be decoded #86

pinkunicorn opened this issue Jun 1, 2020 · 2 comments

Comments

@pinkunicorn
Copy link

I'm rerunning an old script that has worked fine previously and hasn't been changed. I have pip-installed gkeepapi, which claims to be 0.11.3. I haven't used this for a while, so unfortunately I can't say exactly when it broke.

This is what I get:

Traceback (most recent call last):
File "/Users/hans/Dropbox/keep.py", line 13, in
keep.login('pinkunicorn', 'mypassword')
File "/usr/local/lib/python2.7/site-packages/gkeepapi/init.py", line 519, in login
self.load(auth, state, sync)
File "/usr/local/lib/python2.7/site-packages/gkeepapi/init.py", line 565, in load
self.sync(True)
File "/usr/local/lib/python2.7/site-packages/gkeepapi/init.py", line 825, in sync
labels=[i.save() for i in self._labels.values()] if labels_updated else None,
File "/usr/local/lib/python2.7/site-packages/gkeepapi/init.py", line 331, in changes
json=params
File "/usr/local/lib/python2.7/site-packages/gkeepapi/init.py", line 205, in send
response = self._send(**req_kwargs).json()
File "/usr/local/lib/python2.7/site-packages/requests/models.py", line 812, in json
return complexjson.loads(self.text, **kwargs)
File "/usr/local/Cellar/python@2/2.7.15_1/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/2.7.15_1/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/2.7.15_1/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

@kiwiz
Copy link
Owner

kiwiz commented Jun 1, 2020

0.11.3 is pretty old. You should update to the newest version (pip install --upgrade gkeepapi)

I'd also recommend updating to Python 3 - some people have reported issues with Py 2 (See #81

@pinkunicorn
Copy link
Author

Ah, sorry. I'm not a Python person; I thought pip install by itself would update if there was one. I'm now on 0.11.15 and the script works again.

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

2 participants