Python Systemerror:bad build_const_key_map键参数
我有一些代码在 python3.10 中运行,大约 80% 的时间我收到此错误,
SystemError: bad BUILD_CONST_KEY_MAP keys argument
该错误抛出在在地图中设置值的行上
a_map= defaultdict(lambda: defaultdict(lambda: {}))
a_map[key1][key2] = {...}
该项目相当大,因此很难共享代码,尽管主要问题是当我在映射中设置值的行上放置断点时(这是回溯指向的行),不会引发错误。该错误似乎仅在未设置断点时发生。
我不太确定如何进一步调试它,我已将打印放入代码中以输出地图和键,一切看起来都有效且正常。
有关检查内容或如何收集更多调试信息的任何指示吗?
I have some code running in python3.10 and about 80% of the time I get this error
SystemError: bad BUILD_CONST_KEY_MAP keys argument
the error is thrown on a line which sets a value in a map
a_map= defaultdict(lambda: defaultdict(lambda: {}))
a_map[key1][key2] = {...}
The project is fairly large so its hard to share code, although the main issue is that when I place a breakpoint on the line that sets the value in the map (this is the line which the backtrace points to is the cause), no error is thrown. The error only seems to occur when no breakpoint is set.
I am not really sure how to debug this any further, I have put prints in the code to output the map and keys and everything looks valid and fine.
Any pointers on what to check or how to gather more debug information?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论