icesat2py/icepyx

HTML Harmony order details link broken

オープン

#690 opened on 2025/05/23

 (9 件のコメント) (0 件のリアクション) (2 人の担当者)Python (119 件のフォーク)auto 404
buggood first issue

Repository metrics

Stars
 (256 個のスター)
PR merge metrics
 (PR metrics pending)

説明

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().

コントリビューターガイド