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"

 

相关文章:

  • 2022-12-23
  • 2021-07-16
  • 2021-07-25
  • 2022-12-23
  • 2021-11-18
  • 2022-02-01
  • 2021-06-29
  • 2021-09-05
猜你喜欢
  • 2021-11-18
  • 2021-04-29
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案