From 17293bee7991c158e02804fd3999ddc690f27c88 Mon Sep 17 00:00:00 2001 From: Misaka_Company Date: Thu, 23 Jul 2026 13:55:48 +0800 Subject: [PATCH] fix: correct expected_undelivered.BASE anchor after package move MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Tier 1 regression: expected_undelivered.py carries its own BASE=dirname(__file__) anchor (a duplicate of paths.py). The package move dropped the file one level deeper, so BASE resolved to inbound_verify/ and DOWNLOADS/OUTPUT pointed at non-existent inbound_verify/downloads|output — while site downloads write to the project-root dirs via paths.py. process()/write_site_file() thus skipped the compare with '[跳过] downloads 下缺少 ...', returned None/False, and every undelivered task for the 4 web/app sites reported failed (重试耗尽) despite the files downloading fine. Fix: anchor BASE two levels up (mirrors paths.py). Verified: write_site_file returns True; all 4 undelivered tasks now success with 未到 files generated. Co-Authored-By: Claude --- inbound_verify/expected_undelivered.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/inbound_verify/expected_undelivered.py b/inbound_verify/expected_undelivered.py index 1b9fc2f..b23e9c6 100644 --- a/inbound_verify/expected_undelivered.py +++ b/inbound_verify/expected_undelivered.py @@ -40,7 +40,9 @@ from openpyxl.chart import BarChart, Reference from openpyxl.worksheet.page import PageMargins from openpyxl.worksheet.properties import PageSetupProperties -BASE = os.path.dirname(os.path.abspath(__file__)) +# 包内文件:上两级 = 项目根(与 paths.BASE_DIR 一致;站点下载落在 /downloads)。 +# 注:本模块自带锚点是 paths.py 的重复,Tier 2 计划改为直接引用 paths.DOWNLOAD_DIR/OUTPUT_DIR。 +BASE = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) DOWNLOADS = os.path.join(BASE, "downloads") OUTPUT = os.path.join(BASE, "output") OUTFILE = os.path.join(OUTPUT, "应到未到数据.xlsx")