AnsweredAssumed Answered

Same python code works in Arcgis python window, but fails in pyScripter.

Question asked by engchro@yahoo.com on Nov 11, 2014
Latest reply on Nov 23, 2014 by engchro@yahoo.com

Same python code works in Arcgis python window, but fails in pyScripter.

This code works in the arcgis python window but in PyScripter,it shows a warring message of:

(Exceptions. IO Error: "CandidateStations_Centroid" does not exist)!

 

import arcpy

path=("C:/Users/fazeel/Desktop/ExampleCase/LeicesterCity_Leeds")

arcpy.env.workspace=path

fields=arcpy.ListFields("CandidateStations_Centroid")

for fld in fields:

    print fld.name

 

I wonder to know the reason of this warring message, any suggestion please?

 

Many thanks

Outcomes