You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
AttachmentManager.get_list() isn't returning correct attachments from a branch version
Even with the version parameter specified, the returned attachments is coming from the SDE.Default version.
To Reproduce
Steps to reproduce the behavior:
fromarcgis.gisimportGISfromarcgis.features._versionimportVersionManagerfromarcgis.features.managersimportAttachmentManagerportalUrl="https://<server name>/portal/"user="unowner.electric"pw=""unFeatureServiceURL="https://<server name>/server/rest/services/Electric_UN/Electric_Utility_Network/FeatureServer"versionMgmtServiceURL=unFeatureServiceURL.replace("FeatureServer", "VersionManagementServer" )
# Connect to your Enterprise Portalgis=GIS(url=portalUrl, username=user, password=pw, verify_cert=True)
token=gis._con.tokenvms=VersionManager(url=versionMgmtServiceURL, gis=gis)
version=vms.get("unowner.electric.AttachmentEditing_20250418111109")
print(version.properties['versionName'])
featureOID=126forlyrinversion.layers :
if'910'inlyr.url :
print("======================================================================================")
print(f"ArcGIS Python API: List Attachments for feature {featureOID} in version {version.properties['versionName']}")
print("======================================================================================")
attachmentManager=AttachmentManager(layer=lyr, version=version)
existingAttachments=attachmentManager.get_list(oid=featureOID) ##This is only finding Attachments in DefaultforexistinginexistingAttachments :
print(f" {existing} ")
error:
<copythefullerrormessagehere>Noerrormessages. Justwrongresult**Screenshots**seeattachmentTheRESTEndpointisreturningthecorrectattachments. ThePythonAPIisn't.
[AttachmentManagerget_listexpectedresults.docx](https://github.com/user-attachments/files/19850929/AttachmentManager.get_list.expected.results.docx)
**Expectedbehavior**AttachmentsinthebranchnamedversionsarereturnedbytheAPI**Platform (pleasecompletethefollowinginformation):**-OS: [e.g. iOS]: Windows11-Browser [e.g. chrome, safari] N/A-PythonAPIVersion [e.g. `1.6.2`] (youcangetthisbytyping`print(arcgis.__version__)`-2.4.0-RunningpythonscriptinVSCodeonamachinewithArcGISPro3.4.3installed**Additionalcontext**I'm an Esri employee and can provide access to the Utility Network service that I'mseeingthisbehavioron. AlthoughI'm using a Utility Network service, I don'tthinktheissuehasanythingtodowiththeUtilityNetwork.
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
Describe the bug
AttachmentManager.get_list() isn't returning correct attachments from a branch version
Even with the version parameter specified, the returned attachments is coming from the SDE.Default version.
To Reproduce
Steps to reproduce the behavior:
error:
The text was updated successfully, but these errors were encountered: