<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Copy_management is throwing an exception but still copies database in Data Management Questions</title>
    <link>https://community.esri.com/t5/data-management-questions/copy-management-is-throwing-an-exception-but-still/m-p/184512#M10418</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have a 9.3 file geodatabase that we use as a template.&amp;nbsp; I am trying to upgrade the database to 10.1 version, but I am having problems with Copy_management when I run my script that sets up the workspace.&amp;nbsp; Copy_management is throwing an exception when it attempts to copy the 10.1 version of the database:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ExecuteError: ERROR 000260 - Failed to copy [my data] Failed to execute (Copy).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have tested just the Copy_management tool and I receive the same exception, however, when you refresh the folder the database was copied.&amp;nbsp; I have had the same results when I create a blank file geodatabase and try and copy it with the Copy_management tool, so it doesn�??t appear to be an issue with our database template. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Any ideas what I am doing wrong or is this a bug? I have never had this problem with Copy_managment prior to updating the geodatabase. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Below are the pertinent portions of the code that are failing. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;-f&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;#the location where the data is going
Carto_WS = arcpy.GetParameterAsText(0)
#the letter/numbers used to identify the work and name database
LOCAL_ID = arcpy.GetParameterAsText(1)
#this is the database that is copied
BlankESMTROW = arcpy.GetParameterAsText(2)
BlankESMTROW_WS = os.path.dirname(BlankESMTROW)
LOCAL_IDReplace = LOCAL_ID.replace ('-','_')
fGDBName = LOCAL_IDReplace +".gdb"
newFolder = Carto_WS + "\\" + LOCAL_IDReplace
fGDBPath = newFolder +"\\"+fGDBName
arcpy.Copy_management(BlankESMTROW,fGDBPath)&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 09:22:29 GMT</pubDate>
    <dc:creator>FrankLahm_III</dc:creator>
    <dc:date>2021-12-11T09:22:29Z</dc:date>
    <item>
      <title>Copy_management is throwing an exception but still copies database</title>
      <link>https://community.esri.com/t5/data-management-questions/copy-management-is-throwing-an-exception-but-still/m-p/184512#M10418</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have a 9.3 file geodatabase that we use as a template.&amp;nbsp; I am trying to upgrade the database to 10.1 version, but I am having problems with Copy_management when I run my script that sets up the workspace.&amp;nbsp; Copy_management is throwing an exception when it attempts to copy the 10.1 version of the database:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ExecuteError: ERROR 000260 - Failed to copy [my data] Failed to execute (Copy).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have tested just the Copy_management tool and I receive the same exception, however, when you refresh the folder the database was copied.&amp;nbsp; I have had the same results when I create a blank file geodatabase and try and copy it with the Copy_management tool, so it doesn�??t appear to be an issue with our database template. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Any ideas what I am doing wrong or is this a bug? I have never had this problem with Copy_managment prior to updating the geodatabase. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Below are the pertinent portions of the code that are failing. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;-f&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;#the location where the data is going
Carto_WS = arcpy.GetParameterAsText(0)
#the letter/numbers used to identify the work and name database
LOCAL_ID = arcpy.GetParameterAsText(1)
#this is the database that is copied
BlankESMTROW = arcpy.GetParameterAsText(2)
BlankESMTROW_WS = os.path.dirname(BlankESMTROW)
LOCAL_IDReplace = LOCAL_ID.replace ('-','_')
fGDBName = LOCAL_IDReplace +".gdb"
newFolder = Carto_WS + "\\" + LOCAL_IDReplace
fGDBPath = newFolder +"\\"+fGDBName
arcpy.Copy_management(BlankESMTROW,fGDBPath)&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 09:22:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/copy-management-is-throwing-an-exception-but-still/m-p/184512#M10418</guid>
      <dc:creator>FrankLahm_III</dc:creator>
      <dc:date>2021-12-11T09:22:29Z</dc:date>
    </item>
  </channel>
</rss>

