0
点赞
收藏
分享

微信扫一扫

string indices must be integers

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_字符串

举报

相关推荐

sum of two integers

0 条评论