From 856e9aa6d12da2ea3b26dd94a51c0b3314b2ea27 Mon Sep 17 00:00:00 2001 From: "2569718930@qq.com" <2569718930@qq.com> Date: Fri, 15 May 2026 03:42:14 +0800 Subject: [PATCH] =?UTF-8?q?AMSC=20=E6=B7=BB=E5=8A=A0=20stderr=20=E8=B0=83?= =?UTF-8?q?=E8=AF=95=E8=BE=93=E5=87=BA=EF=BC=8C=E7=A1=AE=E8=AE=A4=20urllib?= =?UTF-8?q?=20=E4=BB=A3=E7=A0=81=E8=B7=AF=E5=BE=84=E8=A2=AB=E6=89=A7?= =?UTF-8?q?=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/data_collection/amsc_awos_sources.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/data_collection/amsc_awos_sources.py b/src/data_collection/amsc_awos_sources.py index cb8bd0df..c58b4ce9 100644 --- a/src/data_collection/amsc_awos_sources.py +++ b/src/data_collection/amsc_awos_sources.py @@ -192,10 +192,12 @@ class AmscAwosSourceMixin: return headers def _http_get_json(self, url: str, *, headers: Optional[Dict[str, str]] = None) -> Optional[Dict[str, Any]]: + import sys as _sys ctx = ssl.create_default_context() ctx.check_hostname = False ctx.verify_mode = ssl.CERT_NONE req = Request(url, headers=headers or {}) + print(f"[AMSC_DEBUG] _http_get_json called url={url[:60]}", file=_sys.stderr, flush=True) with urlopen(req, timeout=getattr(self, "timeout", 10.0), context=ctx) as resp: raw = resp.read().decode("utf-8", errors="replace") try: