I am taking the Python for Everyone Tutorial and am stuck on Step 4. When I run my SpatialRef script, it generates the following error.
Traceback (most recent call last):
File "C:/Users/lvc3/Documents/PythonPractice/PythEveryone/HandleErrors/Debugging.py", line 10, in <module>
arcpy.Buffer_analysis(streams, streams + str(buff), buff)
File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\analysis.py", line 1125, in Buffer
raise e
File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\analysis.py", line 1122, in Buffer
retval = convertArcObjectToPythonObject(gp.Buffer_analysis(*gp_fixargs((in_features, out_feature_class, buffer_distance_or_field, line_side, line_end_type, dissolve_option, dissolve_field, method), True)))
File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\geoprocessing\_base.py", line 511, in <lambda>
return lambda *args: val(*gp_fixargs(args, True))
arcgisscripting.ExecuteError: Failed to execute. Parameters are not valid.
ERROR 000725: Output Feature Class: Dataset C:\Users\lvc3\Documents\PythonPractice\PythEveryone\HandleErrors\SanDiego.gdb\SD_Stream100 already exists.
Failed to execute (Buffer).
I haven't touched the ArcPy analysis or _base files but I have edited the Debugging file to change the pathway and fix a couple errors. Thank you for any assistance!!
Solved! Go to Solution.
For those of us not familiar with step 4, could you elaborate and perhaps include the code that would have generated the error?
A quick look, suggests that the file already exists and perhaps the arcpy.env.overwriteOutputs wasn't set in the script.
Maybe go in and do a manual delete of the SD_Stream100 featureclass before doing any more scripting
For those of us not familiar with step 4, could you elaborate and perhaps include the code that would have generated the error?
A quick look, suggests that the file already exists and perhaps the arcpy.env.overwriteOutputs wasn't set in the script.
Maybe go in and do a manual delete of the SD_Stream100 featureclass before doing any more scripting
Thank you very much, that fixed it!!
Glad it worked... Enjoy your pythonista journey 😉