MeteoGridCopy dump fails when initialized with pathlib.Path
还没有人认领这个 Issue。
评估
调研方向
从通过 MetaSwapModel.from_file() 初始化 MeteoGridCopy 开始,然后跟踪 dump() 直到调用 dataset.to_netcdf()。使用 pathlib.Path 重现该故障,并验证将路径序列化为字符串后转储能够成功。
由索引模型根据 Issue 内容生成。
描述
MeteoGridCopy is initialsed with pathlib.Path object when using MetaSwapModel.from_file(). During dump(), the package is serialized using dataset.to_netcdf(). Xarray cannot serialize pathlib.Path objects and raises the exception 'ValueError: unable to infer dtype on variable 'path'; xarray cannot serialize arbitrary Python objects'.
Proposed fix:
force to string via self.dataset["path"] = str(path)
This worked for me
- 主要语言
- Python
- 星标
- 41
- 派生
- 11
- 平均合并
- 15 小时 18 分钟
- 30 天内合并 PR
- 4
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 没有贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
Deltares/imod-python 的其他 Issue
-
enhancement good first issue
难度 2/5 1-3 小时 新手友好度 74/100
Deltares/imod-python#1843 ·
-
documentation
难度 1/5 1 小时以内 新手友好度 68/100
Deltares/imod-python#1684 ·
-
refactor
难度 4/5 3-5 天 新手友好度 45/100
Deltares/imod-python#1921 ·
-
难度 4/5 3-5 天 新手友好度 55/100
Deltares/imod-python#1911 ·
-
难度 3/5 1-2 天 新手友好度 72/100
Deltares/imod-python#1910 ·
查看 Deltares/imod-python 的全部 Issue
相似的 Issue
-
ACK_WAITING HELP_WANTED UPDATE_CS
难度 2/5 1-3 小时 新手友好度 78/100
OWASP/CheatSheetSeries#2458 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 90/100
BasedHardware/omi#19711 ·
维护者通常 1 天内回复
-
Qwen3_5MoeModel no longer returns router_logits, breaking aux loss with output_router_logits=True未关闭
难度 2/5 1-3 小时 新手友好度 78/100
huggingface/transformers#49172 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
vllm-project/vllm-metal#885 ·
维护者通常 1 天内回复