<?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 Re: Python Copy_management throws exception &amp;quot;ERROR 000979&amp;quot; in Geoprocessing Questions</title>
    <link>https://community.esri.com/t5/geoprocessing-questions/python-copy-management-throws-exception-amp-quot/m-p/365319#M12569</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;My bad...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Use the CopyFeatures tool. The Copy tool will not reformat the data (FGDB to shp), but CopyFeatures will. The item in my other post probably wouldn't hurt either...&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 06 Oct 2010 02:50:29 GMT</pubDate>
    <dc:creator>ChrisSnyder</dc:creator>
    <dc:date>2010-10-06T02:50:29Z</dc:date>
    <item>
      <title>Python Copy_management throws exception &amp;quot;ERROR 000979&amp;quot;</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/python-copy-management-throws-exception-amp-quot/m-p/365317#M12567</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am trying to copy a series of feature classes from a file geodatabase out to a folder of shapefiles but am encountering a problem.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The code below is throwing this exception:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Failed to execute. Parameters are not valid.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ERROR 000979: Cannot copy between different workspaces.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Failed to execute (Copy).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any help would be appreciated. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;import arcpy, sys, os, string&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;infc = r'C:\temp\basedata\SK_BS.gdb\BS_1250009_0'&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;outshp = r'C:\temp\Basedata_shps\BS_1250009_0.shp'&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;outpath = r'C:\temp\Basedata_shps'&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.env.workspace = outpath&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.Copy_management(infc, outshp)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Oct 2010 15:21:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/python-copy-management-throws-exception-amp-quot/m-p/365317#M12567</guid>
      <dc:creator>NeilRipley</dc:creator>
      <dc:date>2010-10-05T15:21:45Z</dc:date>
    </item>
    <item>
      <title>Re: Python Copy_management throws exception "ERROR 000979"</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/python-copy-management-throws-exception-amp-quot/m-p/365318#M12568</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Try either this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import arcpy, sys, os, string
infc = r'C:\temp\basedata\SK_BS.gdb\BS_1250009_0'
outshp = r'C:\temp\Basedata_shps\BS_1250009_0.shp'
arcpy.Copy_management(infc, outshp) &lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;or this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import arcpy, sys, os, string
infc = r'C:\temp\basedata\SK_BS.gdb\BS_1250009_0'
outshp = 'BS_1250009_0.shp'
outpath = r'C:\temp\Basedata_shps'
arcpy.env.workspace = outpath
arcpy.Copy_management(infc, outshp) &lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When you use the full shp path coupled with setting the arcpy.env.workspace, ArcPy gets confused because you are basically then saying the outputshapefile should be:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;r'C:\temp\Basedata_shps\C:\temp\Basedata_shps\BS_1250009_0.shp'&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Personally I almost always use the full path to a dataset instead of setting the workspace. It is cleaner and the code is easier to read/follow.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 16:59:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/python-copy-management-throws-exception-amp-quot/m-p/365318#M12568</guid>
      <dc:creator>ChrisSnyder</dc:creator>
      <dc:date>2021-12-11T16:59:23Z</dc:date>
    </item>
    <item>
      <title>Re: Python Copy_management throws exception "ERROR 000979"</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/python-copy-management-throws-exception-amp-quot/m-p/365319#M12569</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;My bad...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Use the CopyFeatures tool. The Copy tool will not reformat the data (FGDB to shp), but CopyFeatures will. The item in my other post probably wouldn't hurt either...&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Oct 2010 02:50:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/python-copy-management-throws-exception-amp-quot/m-p/365319#M12569</guid>
      <dc:creator>ChrisSnyder</dc:creator>
      <dc:date>2010-10-06T02:50:29Z</dc:date>
    </item>
    <item>
      <title>Re: Python Copy_management throws exception "ERROR 000979"</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/python-copy-management-throws-exception-amp-quot/m-p/1228334#M26573</link>
      <description>&lt;P&gt;I confirm&amp;nbsp;&lt;SPAN&gt;CopyFeatures is much better! &lt;span class="lia-unicode-emoji" title=":grinning_face:"&gt;😀&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Although my task was to copy feature classes between mobile geodatabases (*.geodatabase), setup CopyFeatures was easier than Copy.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Nov 2022 14:55:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/python-copy-management-throws-exception-amp-quot/m-p/1228334#M26573</guid>
      <dc:creator>Paula_Lopes</dc:creator>
      <dc:date>2022-11-03T14:55:07Z</dc:date>
    </item>
  </channel>
</rss>

