tracek / gee_asset_manager

Google Earth Engine Batch Asset Manager
Apache License 2.0
73 stars 35 forks source link

Upload Failing with JSONDecodeError from gsid #42

Closed samapriya closed 6 years ago

samapriya commented 6 years ago

Upload request from asset manager has been failing since morning wonder if it is not getting tool is not getting the gs url (since the error seems to be from reading the response to gsid. Any suggestions?

Here is the error code

Traceback (most recent call last):
  File "/home/samapriya/Downloads/gee_asset_manager-develop/gee_asset_manager/batch_uploader.py", line 109, in upload
    use_multipart=multipart_upload)
  File "/home/samapriya/.local/lib/python2.7/site-packages/retrying.py", line 49, in wrapped_f
    return Retrying(*dargs, **dkw).call(f, *args, **kw)
  File "/home/samapriya/.local/lib/python2.7/site-packages/retrying.py", line 206, in call
    return attempt.get(self._wrap_exception)
  File "/home/samapriya/.local/lib/python2.7/site-packages/retrying.py", line 247, in get
    six.reraise(self.value[0], self.value[1], self.value[2])
  File "/home/samapriya/.local/lib/python2.7/site-packages/retrying.py", line 200, in call
    attempt = Attempt(fn(*args, **kwargs), attempt_number, False)
  File "/home/samapriya/Downloads/gee_asset_manager-develop/gee_asset_manager/batch_uploader.py", line 261, in __upload_file_gee
    gsid = resp.json()[0]
  File "/usr/local/lib/python2.7/dist-packages/requests-2.18.4-py2.7.egg/requests/models.py", line 892, in json
    return complexjson.loads(self.text, **kwargs)
  File "/usr/lib/python2.7/dist-packages/simplejson/__init__.py", line 516, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python2.7/dist-packages/simplejson/decoder.py", line 370, in decode
    obj, end = self.raw_decode(s)
  File "/usr/lib/python2.7/dist-packages/simplejson/decoder.py", line 400, in raw_decode
    return self.scan_once(s, idx=_w(s, idx).end())
JSONDecodeError: Expecting value: line 1 column 1 (char 0)
samapriya commented 6 years ago

Seems going back to the browser and revalidating Google Earth Engine with your account seems to solve the problems, I am leaving this issue open as I test today and will close as soon as I am done testing

samapriya commented 6 years ago

Testing Completed, intermittent issue, if anyone else faces this reauthenticate google earth engine from your browser with your google account and this should fix this.