Select to view content in your preferred language

Error when running custom script tool

5661
13
05-20-2016 07:01 AM
SadanandacharB1
Occasional Contributor

Hi All

  I am getting error when running custom created script tool to copy feature classes from folder to geodatabase

below is the error

Traceback (most recent call last):
  File "D:\Python DVD\Python\Data\Exercise02\CopyFeature.py", line 9, in <module>
    arcpy.CopyFeatures_management(fc, os.path.join(outgdb, fcdesc.basename))
  File "c:\program files (x86)\arcgis\desktop10.2\arcpy\arcpy\management.py", line 2429, in CopyFeatures
    raise e
ExecuteError: ERROR 000210: Cannot create output E:\ArcPy\ResultFeatures\basin
Failed to execute (CopyFeatures).
Failed to execute (MyCopy).

What am i missing, Please help me

0 Kudos
13 Replies
AdrianWelsh
MVP Honored Contributor

Should the N in baseName be capitalized?

arcpy.CopyFeatures_management(fc, os.path.join(outgdb, fcdesc.baseName))

Does that make a difference?

If that is not the case, maybe you could put in a print statement after the user input (the GetParameterAsText) to capture what was inputted to see if it is the right type of input.

0 Kudos
curtvprice
MVP Esteemed Contributor

maybe you could put in a print statement

The GP messages stream helpfully includes the arguments provided to the tool. The OP left that helpful bit of text off, unfortunately.

0 Kudos
DanPatterson_Retired
MVP Emeritus

We are coming full circle on a duplicate problem in your other thread

Custom tool error

see the comments there or provide the information in this thread.

SadanandacharB1
Occasional Contributor

Sorry and Thank you

0 Kudos