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

Use this Forum to find information on, or ask a question about, NASA Earth Science data.
Post Reply
pkanan03
Posts: 1
Joined: Thu Aug 26, 2021 12:00 pm America/New_York
Answers: 0

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: 279
Joined: Mon Sep 30, 2019 8:33 am America/New_York
Answers: 1
Has thanked: 3 times

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.
Regards,
LAADS User Services

To receive news from LAADS DAAC direct to your inbox, email laadsdaac-join@lists.nasa.gov with “subscribe” in the subject line.

Post Reply