HLS tutorial - HTTPError: HTTP Error 403: Forbidden

Use this Forum to find information on, or ask a question about, NASA Earth Science data.
Post Reply
facundofacio
Posts: 2
Joined: Tue Apr 15, 2025 11:53 am America/New_York
Answers: 0
Been thanked: 1 time

HLS tutorial - HTTPError: HTTP Error 403: Forbidden

by facundofacio » Tue Apr 15, 2025 12:09 pm America/New_York

Hello, I'm following HLS tutorial notebook from here https://github.com/nasa/HLS-Data-Resources/blob/main/python/tutorials/HLS_Tutorial.ipynb. When trying to execute the cell from the point 3.2 I am getting a HTTPS 403 error, specifically from this code line:
image = io.imread(browse_urls[10])

I have properly login with earthaccess through .netrc file

Traceback:
---------------------------------------------------------------------------
HTTPError Traceback (most recent call last)
Cell In[16], line 1
----> 1 image = io.imread(browse_urls[10]) # Load jpg browse image into memory
3 # Basic plot of the image
4 plt.figure(figsize=(10,10))

File ~/dev/HLS-Data-Resources/.venv/lib/python3.11/site-packages/skimage/io/_io.py:59, in imread(fname, as_gray, plugin, **plugin_args)
56 if fname.lower().endswith(('.tiff', '.tif')):
57 plugin = 'tifffile'
---> 59 with file_or_url_context(fname) as fname:
60 img = call_plugin('imread', fname, plugin=plugin, **plugin_args)
62 if not hasattr(img, 'ndim'):

File ~/.pyenv/versions/3.11.9/lib/python3.11/contextlib.py:137, in _GeneratorContextManager.__enter__(self)
135 del self.args, self.kwds, self.func
136 try:
--> 137 return next(self.gen)
138 except StopIteration:
139 raise RuntimeError("generator didn't yield") from None

File ~/dev/HLS-Data-Resources/.venv/lib/python3.11/site-packages/skimage/io/util.py:27, in file_or_url_context(resource_name)
25 try:
26 with tempfile.NamedTemporaryFile(delete=False, suffix=ext) as f:
---> 27 with urllib.request.urlopen(resource_name) as u:
28 f.write(u.read())
29 # f must be closed before yielding

File ~/.pyenv/versions/3.11.9/lib/python3.11/urllib/request.py:216, in urlopen(url, data, timeout, cafile, capath, cadefault, context)
214 else:
215 opener = _opener
--> 216 return opener.open(url, data, timeout)

File ~/.pyenv/versions/3.11.9/lib/python3.11/urllib/request.py:525, in OpenerDirector.open(self, fullurl, data, timeout)
523 for processor in self.process_response.get(protocol, []):
524 meth = getattr(processor, meth_name)
--> 525 response = meth(req, response)
527 return response

File ~/.pyenv/versions/3.11.9/lib/python3.11/urllib/request.py:634, in HTTPErrorProcessor.http_response(self, request, response)
631 # According to RFC 2616, "2xx" code indicates that the client's
632 # request was successfully received, understood, and accepted.
633 if not (200 <= code < 300):
--> 634 response = self.parent.error(
635 'http', request, response, code, msg, hdrs)
637 return response

File ~/.pyenv/versions/3.11.9/lib/python3.11/urllib/request.py:563, in OpenerDirector.error(self, proto, *args)
561 if http_err:
562 args = (dict, 'default', 'http_error_default') + orig_args
--> 563 return self._call_chain(*args)

File ~/.pyenv/versions/3.11.9/lib/python3.11/urllib/request.py:496, in OpenerDirector._call_chain(self, chain, kind, meth_name, *args)
494 for handler in handlers:
495 func = getattr(handler, meth_name)
--> 496 result = func(*args)
497 if result is not None:
498 return result

File ~/.pyenv/versions/3.11.9/lib/python3.11/urllib/request.py:643, in HTTPDefaultErrorHandler.http_error_default(self, req, fp, code, msg, hdrs)
642 def http_error_default(self, req, fp, code, msg, hdrs):
--> 643 raise HTTPError(req.full_url, code, msg, hdrs, fp)

HTTPError: HTTP Error 403: Forbidden

Filters:

LP DAACx - dgolon
User Services
User Services
Posts: 422
Joined: Mon Sep 30, 2019 10:00 am America/New_York
Answers: 0
Has thanked: 31 times
Been thanked: 8 times
Contact:

Re: HLS tutorial - HTTPError: HTTP Error 403: Forbidden

by LP DAACx - dgolon » Tue Apr 15, 2025 2:00 pm America/New_York

Hi @facundofacio the LP DAAC has recently been made aware of this issue. We have looked into and are working with several teams to resolve the error. We expect it to be resolved within the next hour, hopefully much sooner. I will follow up once it has been resolved. Thanks - Danielle
Subscribe to the LP DAAC listserv by sending a blank email to lpdaac-join@lists.nasa.gov.

Sign up for the Landsat listserv to receive the most up to date information about Landsat data: https://public.govdelivery.com/accounts/USDOIGS/subscriber/new#tab1.

LP DAAC - dgolon
User Services
User Services
Posts: 44
Joined: Tue Dec 03, 2024 2:37 pm America/New_York
Answers: 0
Has thanked: 11 times

Re: HLS tutorial - HTTPError: HTTP Error 403: Forbidden

by LP DAAC - dgolon » Tue Apr 15, 2025 2:11 pm America/New_York

Hi @facundofacio This issue has been resolved. Please try your request again and let us know if you are still having any issues. Thanks! - Danielle
Subscribe to the LP DAAC listserv by sending a blank email to lpdaac-join@lists.nasa.gov.

Sign up for the Landsat listserv to receive the most up to date information about Landsat data: https://public.govdelivery.com/accounts/USDOIGS/subscriber/new#tab1.

facundofacio
Posts: 2
Joined: Tue Apr 15, 2025 11:53 am America/New_York
Answers: 0
Been thanked: 1 time

Re: HLS tutorial - HTTPError: HTTP Error 403: Forbidden

by facundofacio » Wed Apr 16, 2025 7:37 am America/New_York

Thank you Danielle, it is working fine now!

Post Reply