(smaac) young@deeplp:~/mainspace/code/smaac-master$ python test.py -n=5_run -s=0 -c=5
model name:  5_run_0
Traceback (most recent call last):
  File "test.py", line 144, in <module>
    env = grid2op.make(env_path, test=True, reward_class=L2RPNSandBoxScore, backend=LightSimBackend(),
  File "/home/young/anaconda3/envs/smaac/lib/python3.7/site-packages/lightsim2grid/LightSimBackend.py", line 51, in __init__
    self.init_pp_backend = PandaPowerBackend()
TypeError: 'module' object is not callable

 报错原因:

PandaPowerBackend()是一个类名,同时也是一个文件名。因此冲突了。

 

这个时候自己修改源码修复比较麻烦。解决方法:

pip uninstall lightsim2grid

然后安装这个版本:

0.5.3这个版本。切记。其他版本都有问题。

pip install lightsim2grid==0.5.3  -i https://pypi.tuna.tsinghua.edu.cn/simple some-package

posted on 2022-11-05 20:51  曾冠奇  阅读(43)  评论(0编辑  收藏  举报