question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError

See original GitHub issue

Today was unable to use this API, it was working good yesterday:

Traceback (most recent call last):
  File "gg1.py", line 30, in <module>
    keep.resume('mymail@gmail.com', token1)
  File "C:\Users\NEG\AppData\Local\Programs\Python\Python38-32\lib\site-packages\gkeepapi\__init__.py", line 714, in resume
    self.load(auth, state, sync)
  File "C:\Users\NEG\AppData\Local\Programs\Python\Python38-32\lib\site-packages\gkeepapi\__init__.py", line 741, in load
    self.sync(True)
  File "C:\Users\NEG\AppData\Local\Programs\Python\Python38-32\lib\site-packages\gkeepapi\__init__.py", line 1016, in sync
    changes = self._keep_api.changes(
  File "C:\Users\NEG\AppData\Local\Programs\Python\Python38-32\lib\site-packages\gkeepapi\__init__.py", line 356, in changes
    return self.send(
  File "C:\Users\NEG\AppData\Local\Programs\Python\Python38-32\lib\site-packages\gkeepapi\__init__.py", line 221, in send
    response = self._send(**req_kwargs).json()
  File "C:\Users\NEG\AppData\Local\Programs\Python\Python38-32\lib\site-packages\requests\models.py", line 898, in json
    return complexjson.loads(self.text, **kwargs)
  File "C:\Users\NEG\AppData\Local\Programs\Python\Python38-32\lib\json\__init__.py", line 357, in loads
    return _default_decoder.decode(s)
  File "C:\Users\NEG\AppData\Local\Programs\Python\Python38-32\lib\json\decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "C:\Users\NEG\AppData\Local\Programs\Python\Python38-32\lib\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)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "gg1.py", line 43, in <module>
    print(e.raw)
AttributeError: 'JSONDecodeError' object has no attribute 'raw'

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:18 (3 by maintainers)

github_iconTop GitHub Comments

6reactions
kiwizcommented, May 7, 2020

Looks like Google is explicitly blocking requests with gkeepapi in the User-Agent. Changing it to any other value works fine. Not sure how I want to proceed here - this could become a tedious cat & mouse game. In the meantime, if you want to fix this yourself you can update line 184 in __init__.py.

0reactions
jason79commented, May 9, 2020

i don’t understand why Google is blocking it. Either they themselves should come out with an API for Keep which I think everybody has been asking for, or don’t mess with things that are already built that people find useful. WTF google?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Python error load JSON code of google API - Stack Overflow
I am using google geocode API to test the following Python3.5 code but receive the error below. raise JSONDecodeError("Expecting value", s, err.value) from...
Read more >
raise JSONDecodeError("Expecting value", s, err ... - GitHub
Expected Behavior Program works Actual Behavior raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting ...
Read more >
Expecting value: line 1 column 1 (char 0) in Python - YouTube
raise JSONDecodeError (" Expecting value ", s, err. value ) from None , json. decoder. JSONDecodeError : Expecting value : line 1 column...
Read more >
JSONDecodeError: Expecting value: line 1 column 1 (char 0)
In most of cases, you get json.loads- JSONDecodeError: Expecting value: ... raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.
Read more >
Json decode issue - Discussions on Python.org
File “/usr/lib64/python3.6/json/decoder.py”, line 357, in raw_decode raise JSONDecodeError(“Expecting value”, s, err.value) from None
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found