Decoding a <blob> value in an unknown format returns None instead of raising an error
维护者通常 6 天内回复
还没有人认领这个 Issue。
评估
调研方向
从 src/datajoint/blob.py 第192–194行附近开始,这里 blob.unpack 会处理无法识别的头部;将这条处理路径与 issue 中描述的损坏压缩值行为进行比较。更新行为,使未知的 blob 格式引发 DataJointError。然后检查 issue 中的示例是否引发预期的错误,以及有效格式是否仍能解码。
由索引模型根据 Issue 内容生成。
描述
blob.unpack returns None when the bytes do not start with a known header, mYm\0 or dj0\0, whether or not they are compressed (blob.py#L192-L194). BlobCodec.decode passes that through. A corrupted or foreign value in a <blob> column therefore fetches as None, and can't be told apart from NULL.
from datajoint import blob
blob.unpack(b"garbage\0data") # None
blob.unpack(b"no terminator here") # None
blob.unpack(b"") # None
A corrupt compressed value does raise DataJointError (master, eefe74b4).
Expected
A DataJointError that says the value is not in a known blob format.
Suggested fix
Raise in unpack when the header is not recognized.
- 主要语言
- Python
- 星标
- 198
- 派生
- 103
- 平均合并
- 6 天 1 小时
- 30 天内合并 PR
- 10
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
datajoint/datajoint-python 的其他 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 78/100
datajoint/datajoint-python#1702 ·
维护者通常 6 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 78/100
datajoint/datajoint-python#1701 ·
维护者通常 6 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 74/100
datajoint/datajoint-python#1691 ·
维护者通常 6 天内回复
-
dependencies needs-discussion
难度 2/5 1-3 小时 新手友好度 68/100
datajoint/datajoint-python#1687 ·
维护者通常 6 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 80/100
datajoint/datajoint-python#1668 ·
维护者通常 6 天内回复
查看 datajoint/datajoint-python 的全部 Issue
相似的 Issue
-
cognition
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 78/100
collabnix/awesome-mcp-lists#433 ·
维护者通常 4 天内回复
-
CrossEntropyFilter raises on zero probabilities and single-class results可能已有人在做 @NopeCharon 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
Archmonger/ServeStatic#129 ·
-
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 2 天内回复