[Bug] - PRJ PERIODS with year 0000 cannot be parsed
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
故障发生在 PRJ PERIODS 解析器中,早于 _process_time(time, yearfirst=False).replace(year=1899) 的调用,因此请从 _process_time 以及读取 PRJ 文件中 PERIODS 条目的代码开始。使用年份为 0000 的 PERIODS 行进行复现,并确认 datetime 抛出的 ValueError。当该输入能够成功解析并生成年份为 1899 的时间戳,且有测试覆盖这一情况时,即为完成。
由索引模型根据 Issue 内容生成。
描述
The iMOD PRJ parser cannot read valid iMOD PERIODS entries using year 0000.
This raises:
ValueError: year must be in 1..9999, not 0
The parser does replaces period years with 1899 using:
_process_time(time, yearfirst=False).replace(year=1899)
However, parsing fails before this replacement is reached.
Expected behavior:
PERIODS entries with year 0000 should be accepted and normalized to year 1899
- 主要语言
- Python
- 星标
- 41
- 派生
- 11
- 平均合并
- 3 天 3 小时
- 30 天内合并 PR
- 12
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 没有贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
Deltares/imod-python 的其他 Issue
-
Deltares enhancement good first issue
难度 2/5 1-3 小时 新手友好度 74/100
Deltares/imod-python#1843 ·
维护者通常 1 天内回复
-
documentation
难度 1/5 1 小时以内 新手友好度 68/100
Deltares/imod-python#1684 ·
维护者通常 1 天内回复
-
bug
难度 3/5 半天 新手友好度 50/100
Deltares/imod-python#1939 · 1 条评论 ·
维护者通常 1 天内回复
-
[Bug] - Weekly user acceptance test broken because of some missing kotlin config可能已有人在做 @JoerivanEngelen 于 2 天前认领。 未关闭bug
难度 2/5 1-3 小时 新手友好度 56/100
Deltares/imod-python#1934 · 已指派 1 人 ·
维护者通常 1 天内回复
-
Deltares enhancement
难度 4/5 3-5 天 新手友好度 35/100
Deltares/imod-python#1927 ·
维护者通常 1 天内回复
查看 Deltares/imod-python 的全部 Issue
相似的 Issue
-
难度 1/5 1 小时以内 新手友好度 72/100
-
[Bug]: Importing weave changes the process-wide locale可能已有人在做 @himanshu748 今天认领。 未关闭bug
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
-
bug
难度 2/5 1-3 小时 新手友好度 74/100
-
UX
难度 1/5 1 小时以内 新手友好度 72/100
mediajunkie/piper-morgan-product#2008 · 2 条评论 ·