TypeError: unhashable type: 'collections.OrderedDict'

for repo in json_str.items():
	json_str[repo]['name']="123"

其中json_str为一个OrderedDict类型的多层字典,执行中报TypeError: unhashable type: 'collections.OrderedDict'错误
解决方法:

for repo ,config in json_str.items():
	json_str[repo]['name']="123"

猜你喜欢

转载自blog.csdn.net/liurizhou/article/details/86669646