icesat2py/icepyx

HTML Harmony order details link broken

开放

#690 创建于 2025年5月23日

 (9 条评论) (0 个反应) (2 位负责人)Python (119 个派生)auto 404
buggood first issue

仓库指标

星标
 (256 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

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

贡献者指南