gis脚本错IndentationError: unexpected indent

 时间:2024-10-12 12:19:31

1、首先,分析问题,一般arcgis脚本中报错为:IndentationError: unexpected indent,这种为代码的格式问题,行前空格不一致,格式不规范造成的。

gis脚本错IndentationError: unexpected indent

3、再根据提示行列号,找到问题所在:for i in p: a = i.replace("-","f媪青怍牙") b = a.replace("/","f") abc = os.path.join(s,b) arcpy.Select_analysis(sss,abc,"DLMC= '"+i+"'")cc = arcpy.ListFeatureClasses()

gis脚本错IndentationError: unexpected indent

5、再修改代码:for i in p: a = i.replace("-"巳呀屋饔,"f") b = a.replace("/","f") abc = os.path.join(s,b) arcpy.Select_analysis(sss,abc,"DLMC= '"+i+"'")cc = arcpy.ListFeatureClasses()删除b前空格。使其与上下一致(一般这种情况,前面比上一行多4个空格)

gis脚本错IndentationError: unexpected indent
  • 如何安装AE10.0并添加到VS2010中使用
  • #我来了#Geoserver发布postgis矢量不显示问题
  • 图解ArcGIS Pro启动及创建工程
  • arcgis脚本报错: 'AddMessage' is not defined
  • Designer如何粘贴
  • 热门搜索
    钓鲶鱼用什么饵最好 七月流火是什么意思 什么是多士炉 p2p模式是什么意思 刻舟求剑是什么意思 中秋祝福图片 社保年检需要什么资料 看破红尘的意思 football是什么意思 中秋祝福语