RuntimeError: dictionary changed size during iteration 解决办法-CSDN博客
字典遍历时,不允许修改
修改前
for key in sys.modules.keys(): if key.startswith('selenium'): del sys.modules[key]
改成list
for key in list(sys.modules.keys()): if key.startswith('selenium'): del sys.modules[key]
标签:dictionary,iteration,RuntimeError,changed,modules,sys,key,size From: https://www.cnblogs.com/daizichuan/p/17752229.html