AnsweredAssumed Answered

NoneType object is not iterable

Question asked by JeremiahG_NWL_mobile on Sep 18, 2018
Latest reply on Feb 15, 2019 by sector9cloud9

Hi there, when I run this code in PyScripter IDE I received this error 'NoneType is not iterable'.

Can you please help to address this problem.


import arcpy

#Set geoprocessing environments
arcpy.env.workspace = ("C:\EsriTraining\Python10_0\Data\SanJuan.gdb")
arcpy.env.overwriteOutput = True
#Create list of feature classes in SanJuan.gdb
fcList = arcpy.ListFeatureClasses()
#Create a loop to buffer Lakes and Streams
bufferList = []
for fc in fcList:
if fc == "Lakes" or fc == "Streams":
arcpy.Buffer_analysis(fc, fc + "Buffer", "1000 meters")
bufferList.append(fc + "Buffer")
arcpy.Union_analysis(bufferList, "WaterBuffers")