Python Forum
setting environment in arcpy - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: Data Science (https://python-forum.io/forum-44.html)
+--- Thread: setting environment in arcpy (/thread-16353.html)



setting environment in arcpy - sunny - Feb-24-2019

In arcpy module, when I set the workspace it seems it doesn't work properly and I get a runtime error as below.

import arcpy
#set the path of the data
arcpy.env.workspace='C:\\test'

#using a buffer function that give me an error
arcpy.Buffer_analysis('chah.shp','C:\\test\\chah_buf1.shp','100 Meters')

Runtime error Traceback (most recent call last): File "<string>", line 1, in <module> File "c:\program files (x86)\arcgis\desktop10.4\arcpy\arcpy\analysis.py", line 692, in Buffer raise e ExecuteError: ERROR 000732: Input Features: Dataset chah.shp does not exist or is not supported


#using a buffer function that works fine
arcpy.Buffer_analysis('C:\\test\\chah.shp','C:\\test\\chah_buf1.shp','100 Meters')