一个批量处理数据的脚本运行报错求解


#!/usr/bin/python
# -*- coding: UTF-8 -*-
#为了批量同一文件夹内的线要素类件转区要素类
# 导入模块
import arcpy , time
from arcpy import env
# 设置参数
inpath = arcpy.GetParameterAsText(0) #获取工作空间路径
# 代码
env.workspace = inpath
fclist = arcpy.ListFeatureClasses()
for fc in fclist:
desc = arcpy.Describe(fc)
fctype = desc.shapetype #获取要素类类型
    if fctype == "Polyline":
         outname = fc[:-4]+r"_togon.shp"
         outfc = inpath+"\\"+outname    
         arcpy.FeatureToPolygon_management(fc,outfc) #转换数据
 
添加到工具箱运行时  在fclist = arcpy.ListFeatureClasses() 这一行报错!
求高手帮忙看看 谢谢!
已邀请:

zsf - SGG

赞同来自: 潘建伟

看来就是python典型的缩进符号问题了
对齐,可不是简单的视觉上的对齐。换个编辑器吧骚年,Notepad++或者VS code

要回复问题请先登录注册