<?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: arcpy.RemoveJoin_management error (bug?) in Geoprocessing Questions</title>
    <link>https://community.esri.com/t5/geoprocessing-questions/arcpy-removejoin-management-error-bug/m-p/555557#M18383</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Solution&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I was having the same problem. The join table is a 10.0 SDE feature class. Using "db.owner.feature_class_Name" as the second parameter in arcpy.RemoveJoin_management worked in 10.0 but failed after upgrading client to 10.1. After reading this thread and the arcpy documentation, and discussing how to leave out optional parameters with a more experienced python user, I decided to try opting out of the second parameter by leaving it off entirely. Like so: arcpy.RemoveJoin_management("layername")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;There was only one table joined to the layer in my specific case that this worked.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 11 Jun 2013 22:08:27 GMT</pubDate>
    <dc:creator>PaulMcCombs</dc:creator>
    <dc:date>2013-06-11T22:08:27Z</dc:date>
    <item>
      <title>arcpy.RemoveJoin_management error (bug?)</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/arcpy-removejoin-management-error-bug/m-p/555546#M18372</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Using ArcMap 10.1&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When I run the following in the Python window:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.RemoveJoin_management("POD", "")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I get this error:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Runtime error&amp;nbsp; Traceback (most recent call last):&amp;nbsp;&amp;nbsp; File "&amp;lt;string&amp;gt;", line 1, in &amp;lt;module&amp;gt;&amp;nbsp;&amp;nbsp; File "c:\program files\arcgis\desktop10.1\arcpy\arcpy\management.py", line 5402, in RemoveJoin&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; raise e ExecuteError: ERROR 000582: Error occurred during execution. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Tried everything I could think of: replacing first argument with layer reference, removing second argument, setting secong argument ... Weird thing is when I run the same code in ModelBuilder it works.&amp;nbsp; I export the python from ModelBuilder and it is the exact same as above.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any thoughts?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Sep 2012 18:28:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/arcpy-removejoin-management-error-bug/m-p/555546#M18372</guid>
      <dc:creator>MichaelPorter1</dc:creator>
      <dc:date>2012-09-07T18:28:24Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.RemoveJoin_management error (bug?)</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/arcpy-removejoin-management-error-bug/m-p/555547#M18373</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Is this a raster layer? If so, this is a bug I have logged, reportedly fixed in 10.1 SP 1.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[#NIM066368&amp;nbsp; Remove Join tool fails when the input is a raster with a joined field.]&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://support.esri.com/en/bugs/nimbus/role/beta10_1/TklNMDY2MzY4"&gt;http://support.esri.com/en/bugs/nimbus/role/beta10_1/TklNMDY2MzY4&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Sep 2012 19:36:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/arcpy-removejoin-management-error-bug/m-p/555547#M18373</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2012-09-10T19:36:26Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.RemoveJoin_management error (bug?)</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/arcpy-removejoin-management-error-bug/m-p/555548#M18374</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;nope.&amp;nbsp; Feature Layer.&amp;nbsp; Will try SP1 though.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Sep 2012 18:53:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/arcpy-removejoin-management-error-bug/m-p/555548#M18374</guid>
      <dc:creator>MichaelPorter1</dc:creator>
      <dc:date>2012-09-11T18:53:01Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.RemoveJoin_management error (bug?)</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/arcpy-removejoin-management-error-bug/m-p/555549#M18375</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You don't appear to be naming the join table you want to remove (which is required, and is the name of the join table).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;For example:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;fc = r"C:\temp.gdb\my_mc"
lut = r"C:\temp.gdb\my_lut"
arcpy.MakeFeatureLayer_managment(fc, "mickeymouse")
arcpy.AddJoin_mangement("mickeymouse", "ID", lut, "ID")
arcpy.RemoveJoin_management("mickeymouse", "my_lut")&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 00:00:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/arcpy-removejoin-management-error-bug/m-p/555549#M18375</guid>
      <dc:creator>ChrisSnyder</dc:creator>
      <dc:date>2021-12-12T00:00:08Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.RemoveJoin_management error (bug?)</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/arcpy-removejoin-management-error-bug/m-p/555550#M18376</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for your response&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried that and it did not work.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Also, according to the help documentation {join_name} is optional&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Sep 2012 12:21:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/arcpy-removejoin-management-error-bug/m-p/555550#M18376</guid>
      <dc:creator>MichaelPorter1</dc:creator>
      <dc:date>2012-09-12T12:21:56Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.RemoveJoin_management error (bug?)</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/arcpy-removejoin-management-error-bug/m-p/555551#M18377</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Did you use the JoinField function rather than the AddField by accident?&amp;nbsp; If you used&amp;nbsp; arcpy.JoinField_management you cannot remove the join because this makes a permanent join to the attribute table, whereas the arcpy.AddJoin_management will make a temporary join that can be removed.&amp;nbsp; This is the only reason I can think of as to why you cannot remove the join.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Sep 2012 14:31:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/arcpy-removejoin-management-error-bug/m-p/555551#M18377</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2012-09-12T14:31:21Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.RemoveJoin_management error (bug?)</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/arcpy-removejoin-management-error-bug/m-p/555552#M18378</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The Help topic is wrong in that regard. I cannot think of an instance when the join name would be an optional parameter. In fact the Help topic is pretty clear about the proper naming convention of the join name: &lt;/SPAN&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.1/index.html#//001700000066000000" rel="nofollow noopener noreferrer" target="_blank"&gt;http://resources.arcgis.com/en/help/main/10.1/index.html#//001700000066000000&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is some of my own v10.1 Python code that uses the RemoveJoin tool:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;#Process: Populates the O_RB_DIST, O_RB_OID, and O_RB_WTY fields
oesfRipBuffFC = root + "\\layer_prep\\oesf_rip_buff.gdb\\oesf_rip_buff"
arcpy.MakeFeatureLayer_management(indxTileFC, indxTileFL, "FID_oesf_rip_buff &amp;gt; -1")
if int(arcpy.GetCount_management(indxTileFL).getOutput(0)) &amp;gt; 0:
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.AddJoin_management(indxTileFL, "FID_oesf_rip_buff", oesfRipBuffFC, "OBJECTID", "KEEP_COMMON")
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.CalculateField_management(indxTileFL, "O_RB_OID", "[oesf_rip_buff.LDO_OID]", "VB")
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.CalculateField_management(indxTileFL, "O_RB_DIST", "[oesf_rip_buff.DISTANCE]", "VB")
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.CalculateField_management(indxTileFL, "O_RB_WTY", "[oesf_rip_buff.SL_WTRTY_CD]", "VB")
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.RemoveJoin_management(indxTileFL, "oesf_rip_buff")&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 00:00:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/arcpy-removejoin-management-error-bug/m-p/555552#M18378</guid>
      <dc:creator>ChrisSnyder</dc:creator>
      <dc:date>2021-12-12T00:00:11Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.RemoveJoin_management error (bug?)</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/arcpy-removejoin-management-error-bug/m-p/555553#M18379</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Forgot to ask: Is there something unusual about your parent table or look up table? For example, is your look up table a GRID .vat, an ODBC table, Excel table, etc.?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Posting more of your code would be helpful (use the # code tag button).&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Sep 2012 15:06:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/arcpy-removejoin-management-error-bug/m-p/555553#M18379</guid>
      <dc:creator>ChrisSnyder</dc:creator>
      <dc:date>2012-09-12T15:06:43Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.RemoveJoin_management error (bug?)</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/arcpy-removejoin-management-error-bug/m-p/555554#M18380</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am still at base ArcGIS 10.1 (no sp1)... RemoveJoin in my script worked fine at 10.0, fails in 10.1.&amp;nbsp; The layer being joined to is a ArcSDE feature class in Oracle.&amp;nbsp; The joined table is also from Oracle ArcSDE 10.0&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;At 10.0, the "join_name" parameter was in the format "owner.table" - no problems&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;At 10.1 "owner.table" format fails, the error message indicates that the parameter should be just "table" - which matches the options in the drop-down if I try to use RemoveJoin tool in ArcToolbox.&amp;nbsp; In either case, script or Toolbox tool, the RemoveJoin still fails with the format "table".&amp;nbsp; The Toolbox tool considered all inputs valid... but it fails with a 999999... error when run.&amp;nbsp; The only way I can make this tool work is by leaving the "join_name" parameter blank which removes all joins, and appears to be my workaround for now.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Nothing seems to match this in the SP1 resolved issues list.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Nov 2012 20:37:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/arcpy-removejoin-management-error-bug/m-p/555554#M18380</guid>
      <dc:creator>SteveSalas</dc:creator>
      <dc:date>2012-11-15T20:37:10Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.RemoveJoin_management error (bug?)</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/arcpy-removejoin-management-error-bug/m-p/555555#M18381</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have had a very interesting episode with this operation as well.&amp;nbsp; For the record I'm working with 10.0 and have not been able to get this to work in an ArcTool script. The only way I could get this to work was by choosing the parameter options from the interactive Python Window.&amp;nbsp; The most inexplicable thing was, if I manually typed in the correct parameters I get a syntax error.&amp;nbsp; If I take the drop-down list choices I'm good.&amp;nbsp; This has certainly got to be a bug that needs to be addressed.&amp;nbsp; See screen shot from Python Window with highlighted Parsing Error and successful execution of the command in last line.[ATTACH=CONFIG]20457[/ATTACH]&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Jan 2013 18:42:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/arcpy-removejoin-management-error-bug/m-p/555555#M18381</guid>
      <dc:creator>GlennCondon</dc:creator>
      <dc:date>2013-01-04T18:42:18Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.RemoveJoin_management error (bug?)</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/arcpy-removejoin-management-error-bug/m-p/555556#M18382</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;This has certainly got to be a bug that needs to be addressed.&amp;nbsp; &lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The best way to make sure a bug fix happens is to submit a support incident. If multiple people report the problem, it's even more likely to be prioritized by the development teams. Although it's possible developers may read this forum, a support incident captures all the information the developers need for the fix.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So please do report bugs like this, and if the bug is logged feel free to post the NIM# here in the forums to further grease the wheels. (this saves time for other users reporting the same bug).&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Jan 2013 13:43:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/arcpy-removejoin-management-error-bug/m-p/555556#M18382</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2013-01-07T13:43:23Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.RemoveJoin_management error (bug?)</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/arcpy-removejoin-management-error-bug/m-p/555557#M18383</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Solution&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I was having the same problem. The join table is a 10.0 SDE feature class. Using "db.owner.feature_class_Name" as the second parameter in arcpy.RemoveJoin_management worked in 10.0 but failed after upgrading client to 10.1. After reading this thread and the arcpy documentation, and discussing how to leave out optional parameters with a more experienced python user, I decided to try opting out of the second parameter by leaving it off entirely. Like so: arcpy.RemoveJoin_management("layername")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;There was only one table joined to the layer in my specific case that this worked.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Jun 2013 22:08:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/arcpy-removejoin-management-error-bug/m-p/555557#M18383</guid>
      <dc:creator>PaulMcCombs</dc:creator>
      <dc:date>2013-06-11T22:08:27Z</dc:date>
    </item>
  </channel>
</rss>

