Python Forum
setting environment in arcpy
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
setting environment in arcpy
#1
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')
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Setting up and integrating Jupyter Notebook development environment with VSC Drone4four 3 1,784 Sep-12-2022, 09:18 AM
Last Post: Drone4four

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020