通过脚本计算预计完成时间,出现部分不显示计算

476f12dcce820c1316ddfeaa0b63542

查了脚本执行次数也没有超,不知道为何不显示
脚本如下:
import datetime
national_day = “国庆节”
mid_autumn_festival = “中秋”
anti_fascist_70th_day = “中国人民抗日战争暨世界反法西斯战争胜利70周年纪念日”

节假日列表和周末工作日列表(同上)

holidays = {
datetime.date(year=2023, month=1, day=1): Holiday.new_years_day.value,
datetime.date(year=2023, month=1, day=2): Holiday.new_years_day.value,
datetime.date(year=2023, month=1, day=21): Holiday.spring_festival.value,
datetime.date(year=2023, month=1, day=22): Holiday.spring_festival.value,
datetime.date(year=2023, month=1, day=23): Holiday.spring_festival.value,
datetime.date(year=2023, month=1, day=24): Holiday.spring_festival.value,
datetime.date(year=2023, month=1, day=25): Holiday.spring_festival.value,
datetime.date(year=2023, month=1, day=26): Holiday.spring_festival.value,
datetime.date(year=2023, month=4, day=5): Holiday.tomb_sweeping_day.value,
datetime.date(year=2023, month=5, day=1): Holiday.labour_day.value,
datetime.date(year=2023, month=6, day=22): Holiday.dragon_boat_festival.value,
datetime.date(year=2023, month=9, day=29): Holiday.mid_autumn_festival.value,
datetime.date(year=2023, month=10, day=1): Holiday.national_day.value,
datetime.date(year=2023, month=10, day=2): Holiday.national_day.value,
datetime.date(year=2023, month=10, day=3): Holiday.national_day.value,
datetime.date(year=2023, month=10, day=4): Holiday.national_day.value,
datetime.date(year=2023, month=10, day=5): Holiday.national_day.value,
datetime.date(year=2023, month=10, day=6): Holiday.national_day.value,
datetime.date(year=2024, month=1, day=1): Holiday.new_years_day.value,
datetime.date(year=2024, month=2, day=9): Holiday.spring_festival,
datetime.date(year=2024, month=2, day=10): Holiday.spring_festival,
datetime.date(year=2024, month=2, day=10): Holiday.spring_festival,
datetime.date(year=2024, month=2, day=11): Holiday.spring_festival,
datetime.date(year=2024, month=2, day=12): Holiday.spring_festival,
datetime.date(year=2024, month=2, day=13): Holiday.spring_festival,
datetime.date(year=2024, month=2, day=14): Holiday.spring_festival,
datetime.date(year=2024, month=2, day=15): Holiday.spring_festival,
datetime.date(year=2024, month=2, day=16): Holiday.spring_festival,
datetime.date(year=2024, month=2, day=17): Holiday.spring_festival,
datetime.date(year=2024, month=4, day=4): Holiday.tomb_sweeping_day,
datetime.date(year=2024, month=4, day=5): Holiday.tomb_sweeping_day,
datetime.date(year=2024, month=4, day=6): Holiday.tomb_sweeping_day,
datetime.date(year=2024, month=5, day=1): Holiday.labour_day,
datetime.date(year=2024, month=5, day=2): Holiday.labour_day,
datetime.date(year=2024, month=5, day=3): Holiday.labour_day,
datetime.date(year=2024, month=5, day=4): Holiday.labour_day,
datetime.date(year=2024, month=5, day=5): Holiday.labour_day,
datetime.date(year=2024, month=6, day=8): Holiday.dragon_boat_festival,
datetime.date(year=2024, month=6, day=9): Holiday.dragon_boat_festival,
datetime.date(year=2024, month=6, day=10): Holiday.dragon_boat_festival,
datetime.date(year=2024, month=9, day=15): Holiday.mid_autumn_festival,
datetime.date(year=2024, month=9, day=16): Holiday.mid_autumn_festival,
datetime.date(year=2024, month=9, day=17): Holiday.mid_autumn_festival,
datetime.date(year=2024, month=10, day=1): Holiday.national_day,
datetime.date(year=2024, month=10, day=2): Holiday.national_day,
datetime.date(year=2024, month=10, day=3): Holiday.national_day,
datetime.date(year=2024, month=10, day=4): Holiday.national_day,
datetime.date(year=2024, month=10, day=5): Holiday.national_day,
datetime.date(year=2024, month=10, day=6): Holiday.national_day,
datetime.date(year=2024, month=10, day=7): Holiday.national_day,
# … 剩余节假日
}

workdays = {
datetime.date(year=2024, month=1, day=4): Holiday.spring_festival.value,
datetime.date(year=2024, month=2, day=4): Holiday.spring_festival,
datetime.date(year=2024, month=2, day=18): Holiday.spring_festival,
datetime.date(year=2024, month=4, day=7): Holiday.tomb_sweeping_day,
datetime.date(year=2024, month=4, day=28): Holiday.national_day,
datetime.date(year=2024, month=5, day=11): Holiday.labour_day,
datetime.date(year=2024, month=9, day=14): Holiday.mid_autumn_festival,
datetime.date(year=2024, month=9, day=29): Holiday.national_day,
datetime.date(year=2024, month=10, day=12): Holiday.national_day,
# … 剩余周末工作日
}

辅助函数(同上)

def _wrap_date(date):
if isinstance(date, datetime.datetime):
date = date.date()
return date

def _validate_date(*dates):
if len(dates) != 1:
return list(map(_validate_date, dates))
date = _wrap_date(dates[0])
if not isinstance(date, datetime.date):
raise NotImplementedError(“unsupported type {}, expected type is datetime.date”.format(type(date)))
min_year, max_year = min(holidays.keys()).year, max(holidays.keys()).year
if not (min_year <= date.year <= max_year):
raise NotImplementedError(
“no available data for year {}, only year between [{}, {}] supported”.format(date.year, min_year, max_year)
)
return date

def is_workday(date):
“”"

部分显示结果,说明脚本执行和表格写入是正常的。

我觉得你可以本地先写好 python 脚本和单元测试,看是否代码正常,本地是否能打印出正确的结果?

通过本地测试是可以完整打印的,也在系统上新建表格进行测试均是正常的,但是一到原始表格只能打印部分出来

你说的“系统上是正常的,原始表格只能打印部分出来”,这里的系统上和原始表格是什么意思啊?是云服务和私有部署吗?如果一个系统上正常,那么检查一下出错的系统中是否更新到最新版?配置是否相同等