icesat2py/icepyx

HTML Harmony order details link broken

Open

#690 opened on May 23, 2025

 (9 comments) (0 reactions) (2 assignees)Python (119 forks)auto 404
buggood first issue

Repository metrics

Stars
 (256 stars)
PR merge metrics
 (PR metrics pending)

Description

The "View Details" link that gets rendered when a DataOrder is rendered in a Jupyter Notebook is broken. Clicking on it results in a URL that responds with a 400 status.

The problem is in this line.

self.job_id is a class method of DataOrder, and so the resulting string contains it's repr:

link_html = f'<a target="_blank" href="{self.HARMONY_BASE_URL}{self.job_id}">View Details</a>'
print(link_html)
<a target="_blank" href="https://harmony.earthdata.nasa.gov/workflow-ui/<bound method DataOrder.job_id of DataOrder(job_id=043660ad-15c2-4bd3-81bd-2ad63405b717, type=subset, granules=EarthdataAuth obj with session initialized)>">View Details</a>

I think we should make job_id a property instead of a method (we already track self._job_id as a property - since this isn't computed data, I think we can just drop the class method and replace self._job_id with self.job_id at init time.

Alternatively, replace self.job_id in the link_html string with self._job_id or self.job_id().

Contributor guide