我有以下代码:
import os
test_list = [{"name" : "axi_rd_only_test", "seed" : 3}, {"name" : "axi_invalid_regs_test", "seed" : 5}]
os.popen("cd C:/raft/raftortwo/girobo2/ver/sim")
for test in test_list:
os.environ["MY_TEST_NAME"] = test.name
os.environ["MY_TEST_SEED"] = test.seed
os.system("vsim -c -do top_tb_simulate_reg.tcl")
我收到了以下错误:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\saritr\AppData\Local\Continuum\Anaconda3\lib\site-packages\spyderlib\widgets\externalshell\sitecustomize.py", line 699, in runfile
execfile(filename, namespace)
File "C:\Users\saritr\AppData\Local\Continuum\Anaconda3\lib\site-packages\spyderlib\widgets\externalshell\sitecustomize.py", line 88, in execfile
exec(compile(open(filename, 'rb').read(), filename, 'exec'), namespace)
File "C:/Users/saritr/AppData/Local/Continuum/Anaconda3/lib/site-packages/spyderlib/widgets/externalshell/sitecustomize.py", line 490, in <module>
@monkeypatch_method(pdb.Pdb, 'Pdb')
File "C:/Users/saritr/AppData/Local/Continuum/Anaconda3/lib/site-packages/spyderlib/widgets/externalshell/sitecustomize.py", line 485, in decorator
% (cls.__name__, old_ref))
KeyError: 'SpyderPdb._old_Pdb_user_return already exists.'
我应该以不同的方式定义结构列表吗?