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

Not able to download data !!! #7

Open
janardanroy opened this issue Mar 4, 2024 · 0 comments
Open

Not able to download data !!! #7

janardanroy opened this issue Mar 4, 2024 · 0 comments

Comments

@janardanroy
Copy link

Hi @EduinHSERNA @andreshs137 @tim-devereux
I tried to download GEDI data following the same way as https://github.com/EduinHSERNA/pyGEDI.

But I am getting the following error, please let me know how to resolve it. It feels like getfinder is not working.

Created the subdirectory data/GEDI01_B.001/

JSONDecodeError Traceback (most recent call last)
File ~/anaconda3/envs/gdal/lib/python3.9/site-packages/requests/models.py:971, in Response.json(self, **kwargs)
970 try:
--> 971 return complexjson.loads(self.text, **kwargs)
972 except JSONDecodeError as e:
973 # Catch JSON-related errors and raise as requests.JSONDecodeError
974 # This aliases json.JSONDecodeError and simplejson.JSONDecodeError

File ~/anaconda3/envs/gdal/lib/python3.9/json/init.py:346, in loads(s, cls, object_hook, parse_float, parse_int, parse_constant, object_pairs_hook, **kw)
343 if (cls is None and object_hook is None and
344 parse_int is None and parse_float is None and
345 parse_constant is None and object_pairs_hook is None and not kw):
--> 346 return _default_decoder.decode(s)
347 if cls is None:

File ~/anaconda3/envs/gdal/lib/python3.9/json/decoder.py:337, in JSONDecoder.decode(self, s, _w)
333 """Return the Python representation of s (a str instance
334 containing a JSON document).
335
336 """
--> 337 obj, end = self.raw_decode(s, idx=_w(s, 0).end())
338 end = _w(s, end).end()

File ~/anaconda3/envs/gdal/lib/python3.9/json/decoder.py:355, in JSONDecoder.raw_decode(self, s, idx)
354 except StopIteration as err:
--> 355 raise JSONDecodeError("Expecting value", s, err.value) from None
356 return obj, end

JSONDecodeError: Expecting value: line 1 column 1 (char 0)

During handling of the above exception, another exception occurred:

JSONDecodeError Traceback (most recent call last)
Cell In[8], line 13
9 outdir_1B='data/'+product_1B+'.'+version+'/'
10 # outdir_2A='data/'+product_2A+'.'+version+'/'
11 # outdir_2B='data/'+product_2B+'.'+version+'/'
---> 13 gediDownload(outdir_1B,product_1B,version,bbox,session)

File ~/anaconda3/envs/gdal/lib/python3.9/site-packages/pyGEDI/init.py:71, in gediDownload(outdir, product, version, bbox, session)
69 url='https://lpdaacsvc.cr.usgs.gov/services/gedifinder?product='+product+'&version='+str(version)+'&bbox='+str(bbox)+'&output=json'
70 content=requests.get(url)
---> 71 listh5=content.json().get('data')
73 for url in listh5:
74 url_response(outdir,url,session)

File ~/anaconda3/envs/gdal/lib/python3.9/site-packages/requests/models.py:975, in Response.json(self, **kwargs)
971 return complexjson.loads(self.text, **kwargs)
972 except JSONDecodeError as e:
973 # Catch JSON-related errors and raise as requests.JSONDecodeError
974 # This aliases json.JSONDecodeError and simplejson.JSONDecodeError
--> 975 raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)

JSONDecodeError: Expecting value: line 1 column 1 (char 0)

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

1 participant