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


Messages In This Thread
setting environment in arcpy - by sunny - Feb-25-2019, 09:31 AM
RE: setting environment in arcpy - by sunny - Feb-25-2019, 06:13 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Iterating an attribute table using Arcpy teflon 6 4,132 Oct-28-2019, 09:15 PM
Last Post: teflon
  Advice on Setting Up the Python Environment punksnotdead 1 2,420 May-15-2019, 04:29 PM
Last Post: snippsat
  ARCPY enter excel table into coded domain Just_another_lost_man 6 3,804 Feb-23-2019, 09:23 PM
Last Post: buran
  setting pythonpath variable in environment variables saisankalpj 3 3,542 Dec-05-2018, 10:33 PM
Last Post: Gribouillis
  ARCPY using the arcpy.da.UpdateCursor CornJulio 2 4,862 Oct-12-2016, 03:49 AM
Last Post: CornJulio

Forum Jump:

User Panel Messages

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