python urllib.request showing HTTP Error 504 wile downloading AOD data

Please enter here to ask a question about any NASA Science related topics!
Post Reply
pkanan03
Posts: 1
Joined: Thu Aug 26, 2021 12:00 pm America/New_York

python urllib.request showing HTTP Error 504 wile downloading AOD data

by pkanan03 » Thu Aug 26, 2021 12:05 pm America/New_York

Hello,
following the python example on https://ladsweb.modaps.eosdis.nasa.gov/ ... ts/#python, I am trying to download MODIS AOD files, but I am getting HTTP Error 504 error. Please see my syntax below:

-----
opener = urllib.request.build_opener()
opener.addheaders = [('Authorization', 'Bearer <mytoken>')]
urllib.request.install_opener(opener)
urllib.request.urlretrieve('https://ladsweb.modaps.eosdis.nasa.gov/ ... 134209.hdf', r'my_path')
----

Do I need to do something inherently different? I would appreciate any guidance.

Tags:

LAADS_UserServices_M
User Services
User Services
Posts: 39
Joined: Mon Sep 30, 2019 8:33 am America/New_York

Re: python urllib.request showing HTTP Error 504 wile downloading AOD data

by LAADS_UserServices_M » Tue Sep 21, 2021 12:10 pm America/New_York

Where were having some systems issue during your search time-frame so try again and let us know if you still have problem getting the files. Also, make sure the token you use with your call is generated on ladsweb (https://ladsweb.modaps.eosdis.nasa.gov/) and not from Earthdata URS webpage.

Post Reply