arcpy.RemoveJoin_management error (bug?)

2405
11
09-07-2012 11:28 AM
MichaelPorter1
New Contributor III
Using ArcMap 10.1

When I run the following in the Python window:

arcpy.RemoveJoin_management("POD", "")

I get this error:

Runtime error  Traceback (most recent call last):   File "<string>", line 1, in <module>   File "c:\program files\arcgis\desktop10.1\arcpy\arcpy\management.py", line 5402, in RemoveJoin     raise e ExecuteError: ERROR 000582: Error occurred during execution.

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.  I export the python from ModelBuilder and it is the exact same as above.

Any thoughts?

Thanks
0 Kudos
11 Replies
curtvprice
MVP Esteemed Contributor
This has certainly got to be a bug that needs to be addressed. 


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.

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).
0 Kudos
PaulMcCombs
New Contributor
Solution

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")

There was only one table joined to the layer in my specific case that this worked.
0 Kudos