rl库 AttributeError: ‘bool‘ object has no attribute ‘items‘ 的解决方案

张开发
2026/4/14 10:39:17 15 分钟阅读

分享文章

rl库 AttributeError: ‘bool‘ object has no attribute ‘items‘ 的解决方案
啊没错你又会遇到新的报错还是版本问题旧版本用info新版本用terminated和truncated。我们要去修改core.py老地方“C:\Users\HP\miniconda3\envs\brain\Lib\site-packages\rl”你的RL目录这次要改的是core.py1.核心替换原则将所有for key, value in info.items(): if not np.isreal(value): continue替换为# 确保info是字典类型再遍历 if isinstance(info, dict): for key, value in info.items(): if not np.isreal(value): continue保存重启jupyter。然后我们就能正常训练了

更多文章