python报错string indices must be integers解决如下:
在.py文件中写的data={"a":"123","b":"456"},data类型为dict
而在.py文件中通过data= arcpy.GetParameter(0) 获取在GP中传过来的参数{"a":"123","b":"456"},data类型为字符串。
所以在后续的.py中用到的data['a']就会报如上错误。
string indices must be integers
阅读 119
2023-03-04
python报错string indices must be integers解决如下:
在.py文件中写的data={"a":"123","b":"456"},data类型为dict
而在.py文件中通过data= arcpy.GetParameter(0) 获取在GP中传过来的参数{"a":"123","b":"456"},data类型为字符串。
所以在后续的.py中用到的data['a']就会报如上错误。
相关推荐
精彩评论(0)