<?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: ERROR 000837: The workspace is not the correct workspace type in Geoprocessing Questions</title>
    <link>https://community.esri.com/t5/geoprocessing-questions/error-000837-the-workspace-is-not-the-correct/m-p/88865#M3062</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This didn't work for me with 10.2.2.&amp;nbsp; It tells me error 000837 saying the workspace is not the correct workspace type.&amp;nbsp; Any ideas?&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 06 Jan 2015 00:36:57 GMT</pubDate>
    <dc:creator>BillFarris</dc:creator>
    <dc:date>2015-01-06T00:36:57Z</dc:date>
    <item>
      <title>ERROR 000837: The workspace is not the correct workspace type</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/error-000837-the-workspace-is-not-the-correct/m-p/88857#M3054</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have a very simple python script that does a compress on one of our enterprise GDB's. The script used to successfully run every night but is now receiving the following error:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;"ERROR 000837: The workspace is not the correct workspace type"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;There have been 2 recent changes to our environment - one of which must be a contributing factor to this script now erroring out. The first is upgrading from ArcGIS 10.0 SP4 to ArcGIS 10.1 SP1. The other is that we are now running this script on a new server where the old server had 32 bit processing, and the new server is 64 bit.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is the script that worked on our old server:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;import arcgisscripting&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;gp = arcgisscripting.create()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;gp.toolbox = "management"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;gp.compress("Database Connections\sde_loader@bierstadt.sde")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Running the same script on the new server (only change being the db connection) errored out.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried updating the python code as follows:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;import arcpy&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.ClearWorkspaceCache_management()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.Compress_management("Database Connections\saxon2_bierstadt_sde_loader.sde")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This also received the same error (000837)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any ideas on what may be causing this error would be much appreciated.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Gary&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Nov 2012 21:14:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/error-000837-the-workspace-is-not-the-correct/m-p/88857#M3054</guid>
      <dc:creator>GaryEhrhardt</dc:creator>
      <dc:date>2012-11-20T21:14:35Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR 000837: The workspace is not the correct workspace type</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/error-000837-the-workspace-is-not-the-correct/m-p/88858#M3055</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You should use the correct path syntax using a raw string, it shouldn't be a problem in this case but better safe than sorry.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;arcpy.Compress_management(r"Database Connections\saxon2_bierstadt_sde_loader.sde")&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Are you sure the database connection you are using is an administrator account? Is anyone currently locking any files in the DB?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Nov 2012 21:54:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/error-000837-the-workspace-is-not-the-correct/m-p/88858#M3055</guid>
      <dc:creator>MathewCoyle</dc:creator>
      <dc:date>2012-11-20T21:54:47Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR 000837: The workspace is not the correct workspace type</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/error-000837-the-workspace-is-not-the-correct/m-p/88859#M3056</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Matthew,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for your reply.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried using a raw string for my path name to no avail.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I am using an administrator account when running the script.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I am able to successfully use the compress tool (from toolbox), so I don't think that there is a db lock issue.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;It's only when I try to compress from the python script that I encounter this maddening error.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Gary&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Nov 2012 18:23:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/error-000837-the-workspace-is-not-the-correct/m-p/88859#M3056</guid>
      <dc:creator>GaryEhrhardt</dc:creator>
      <dc:date>2012-11-27T18:23:22Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR 000837: The workspace is not the correct workspace type</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/error-000837-the-workspace-is-not-the-correct/m-p/88860#M3057</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Have you set your workspace environment to sde?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Nov 2012 19:05:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/error-000837-the-workspace-is-not-the-correct/m-p/88860#M3057</guid>
      <dc:creator>MathewCoyle</dc:creator>
      <dc:date>2012-11-27T19:05:08Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR 000837: The workspace is not the correct workspace type</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/error-000837-the-workspace-is-not-the-correct/m-p/88861#M3058</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;According to the documentation and examples, will it help to use the compress command in conjunction with ClearWorkspaceCache.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Ironically, setting your env workspace var may put a 'hold' on it...so (although this is a 10 example, below link), the workspace cache is cleared just before executing the compress...doesn't quite explain why this is behaving this way now though.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;...interesting script example at bottom of page:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.1/index.html#//00170000000m000000"&gt;http://resources.arcgis.com/en/help/main/10.1/index.html#//00170000000m000000&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;...use of ClearWorkspaceCache before compress:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://support.esri.com/en/knowledgebase/techarticles/detail/40657"&gt;http://support.esri.com/en/knowledgebase/techarticles/detail/40657&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Nov 2012 19:26:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/error-000837-the-workspace-is-not-the-correct/m-p/88861#M3058</guid>
      <dc:creator>T__WayneWhitley</dc:creator>
      <dc:date>2012-11-27T19:26:28Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR 000837: The workspace is not the correct workspace type</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/error-000837-the-workspace-is-not-the-correct/m-p/88862#M3059</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Try this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;dbConnect = r'Database Connections\&amp;lt; your sde filename &amp;gt;'&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.env.workspace = ""&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.ClearWorkspaceCache_management(dbConnect)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.Compress_management(dbConnect)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Nov 2012 19:45:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/error-000837-the-workspace-is-not-the-correct/m-p/88862#M3059</guid>
      <dc:creator>T__WayneWhitley</dc:creator>
      <dc:date>2012-11-27T19:45:29Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR 000837: The workspace is not the correct workspace type</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/error-000837-the-workspace-is-not-the-correct/m-p/88863#M3060</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;It turns out that the problem was more of a Microsoft Windows security settings issue. Our new server has a Windows Server 2008 R2 operating system (old server - Windows Server 2003). There's some setting(s) or lack thereof that is preventing the recognition of the "Database Connections" part of the db connection path when accessing via a python script. Haven't resolved that yet but with the help of Umesh from ESRI tech support, I have a workaround that is described below:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Instead of specifying the db connection as "Database Connections\sde_loader@bierstadt.sde"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Obtain the path name on the C drive by right clicking the db connection in ArcCatalog and selecting properties. The path name is on the General tab.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In my case, the name is: C:\Users\ehrhardt\AppData\Roaming\ESRI\Desktop10.1\ArcCatalog\bierstadt_saxon2.sde&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Inserted this name into the script, and the script finally worked!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you to Matthew &amp;amp; Wayne for your suggestions and to Umesh for the workaround solution.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Nov 2012 16:57:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/error-000837-the-workspace-is-not-the-correct/m-p/88863#M3060</guid>
      <dc:creator>GaryEhrhardt</dc:creator>
      <dc:date>2012-11-28T16:57:48Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR 000837: The workspace is not the correct workspace type</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/error-000837-the-workspace-is-not-the-correct/m-p/88864#M3061</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Good to know - Server 2008 R2 is on my test machine, soon-to-be production server.&amp;nbsp; So in case I have a similar problem I'll refer to this.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Also, if it helps, when running 'admin' type of scripts on the server, esp as scheduled tasks, I think it's better to store the connection file in a separate 'non-user-profile' location anyway and specify the UNC pathname.&amp;nbsp; Could create the connection dynamically too.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Anyway, thanks for passing along the info.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Nov 2012 17:58:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/error-000837-the-workspace-is-not-the-correct/m-p/88864#M3061</guid>
      <dc:creator>T__WayneWhitley</dc:creator>
      <dc:date>2012-11-28T17:58:08Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR 000837: The workspace is not the correct workspace type</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/error-000837-the-workspace-is-not-the-correct/m-p/88865#M3062</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This didn't work for me with 10.2.2.&amp;nbsp; It tells me error 000837 saying the workspace is not the correct workspace type.&amp;nbsp; Any ideas?&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jan 2015 00:36:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/error-000837-the-workspace-is-not-the-correct/m-p/88865#M3062</guid>
      <dc:creator>BillFarris</dc:creator>
      <dc:date>2015-01-06T00:36:57Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR 000837: The workspace is not the correct workspace type</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/error-000837-the-workspace-is-not-the-correct/m-p/88866#M3063</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Giving the direct C drive link worked for me as well. Thanks for posting the reply, it helped.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Dec 2017 22:52:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/error-000837-the-workspace-is-not-the-correct/m-p/88866#M3063</guid>
      <dc:creator>DeeptiVB</dc:creator>
      <dc:date>2017-12-18T22:52:33Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR 000837: The workspace is not the correct workspace type</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/error-000837-the-workspace-is-not-the-correct/m-p/88867#M3064</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am not sure if I might get any response on this thread as it looks to be quite an old thread. I am facing a very weird issue in setting the workspace. When I setup the workspace inside python window in ArcMap/ArcCatalog, it just works fine.&lt;/P&gt;&lt;P&gt;But the moment I do the same in a standalone script, the things do not work at all. I tried other options like creating connection file in scratch folder and then setting it as a workspace but still no luck.&lt;/P&gt;&lt;P&gt;This is driving me crazy and any help in this regard is really appreciated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Aug 2018 08:39:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/error-000837-the-workspace-is-not-the-correct/m-p/88867#M3064</guid>
      <dc:creator>HarshalGharat</dc:creator>
      <dc:date>2018-08-20T08:39:35Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR 000837: The workspace is not the correct workspace type</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/error-000837-the-workspace-is-not-the-correct/m-p/88868#M3065</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I interrupted my script while it was compressing the GDB during some testing. Subsequently, I received ERROR 000837 when I reran it. After running the arcpy.ClearWorkspaceCache_management()&amp;nbsp; function, everything worked fine again.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Dec 2019 22:55:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/error-000837-the-workspace-is-not-the-correct/m-p/88868#M3065</guid>
      <dc:creator>Ed_Conrad</dc:creator>
      <dc:date>2019-12-27T22:55:20Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR 000837: The workspace is not the correct workspace type</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/error-000837-the-workspace-is-not-the-correct/m-p/1333971#M26992</link>
      <description>&lt;P&gt;Harshal,&lt;/P&gt;&lt;P&gt;I'm experiencing the same, what was your solution?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 01 Oct 2023 02:13:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/error-000837-the-workspace-is-not-the-correct/m-p/1333971#M26992</guid>
      <dc:creator>Chris_Kell</dc:creator>
      <dc:date>2023-10-01T02:13:02Z</dc:date>
    </item>
  </channel>
</rss>

