Error 000301: Wrong Workspace Type

210
2
09-27-2018 10:34 AM
JoeBorgione
MVP Esteemed Contributor

In ERROR 000301: The workspace is of the wrong type , and https://community.esri.com/message/702068-re-work-space-wrong-type-error-000301?commentID=702068#com...  the same error I'm experiencing is discussed. As in both the earlier posts I'm trying to run arcpy.ReconcileVersions_management().

My 'input_database' is set to a SDE-user connection to an egdb:

SDE_Connection = r'I:\GIS\ArcSDE\SdeUser\sde@RvecPBTEST.sde'

#followed by

versionList = arcpy.ListVersions(SDE_Connection)

arcpy.ReconcileVersions_management(SDE_Connection, "ALL_VERSIONS", "PreWork", versionList,'blah','blah','blah'

I'm trying to reconcile all the versions that are spawned from an intermediate version called 'PreWork'. When I examine the contents of versionList[] all the versions are there, so I'm connected to the workspace.

Joshua Bixby‌ and Dan Patterson‌; you guys commented on the earlier threads; any guidance as to where I should be looking?

That should just about do it....
0 Kudos
2 Replies
JoeBorgione
MVP Esteemed Contributor

The devil is in the details... Notice in Line 7 above, I don't list the owner of the PreWork version.  When I put the owner in, it works.  

arcpy.ReconcileVersions_management(SDE_Connection, "ALL_VERSIONS", 'REC_VEC_DATA.PreWork', versionList, "NO_LOCK_ACQUIRED", "NO_ABORT", "BY_OBJECT", "FAVOR_EDIT_VERSION", "POST", "DELETE_VERSION")

### note 'REC_VEC_DATA.PreWork' as version name

Bottom line: error 000301 can be a catch all generic message.....

That should just about do it....
DanPatterson_Retired
MVP Esteemed Contributor

Yeah... that's what I was going to say SDEvil