Select to view content in your preferred language

ArcGIS Pro Python - A row with this OID already exists

1235
5
Jump to solution
05-16-2024 09:15 AM
LanceCole
MVP Regular Contributor

We upgraded to ArcGIS Pro 3.3 to fix several issues that were resolved in the newer version and found another.  We have multiple scripts that download data from ArcGIS Server and Portal sites for processing using FeatureLayer(url).query.  These scripts and services have been in place for some time and working; however, we are receiving error messages on these scripts when run form ArcGIS Pro 3.3.

ERROR 001558: Error parsing json file '<filename>.json'. A row with this OID already exists.

We have confirmed the source file does not contain duplicate OIDs and the script does work from ArcGIS Pro 3.2.

Any suggestions or notable changes between 3.2 and 3.3 that would cause this issue?

 

from arcgis.features import FeatureLayer
url = "https://<FQDN>/server/rest/services/Hosted/<feature>/FeatureServer/0"
FeatureLayer(url).query(return_true_curves=False).save("memory", "temp")

 

 

Tags (3)
1 Solution

Accepted Solutions
LanceCole
MVP Regular Contributor

After working with ESRI support for the past two months they have been able to replicate this issue on some feature services and have assigned a BUG-000169129. Once a public link is available I will include a hyperlink to the bug report.

BUG Link: https://support.esri.com/en-us/bug/querying-an-arcgis-enterprise-hosted-feature-service-us-bug-00016...

View solution in original post

0 Kudos
5 Replies
LanceCole
MVP Regular Contributor

After working with ESRI support for the past two months they have been able to replicate this issue on some feature services and have assigned a BUG-000169129. Once a public link is available I will include a hyperlink to the bug report.

BUG Link: https://support.esri.com/en-us/bug/querying-an-arcgis-enterprise-hosted-feature-service-us-bug-00016...

0 Kudos
SamComo
New Contributor

Hey,

The bug link is not active. Did you ever find a solution to this issue? I am running into it using the Append tool for the Address Data Management Solution. 

0 Kudos
LanceCole
MVP Regular Contributor

@SamComo,

Looks like ESRI broke a few thing on their website.  The Bug is still listed as Confirmed/In Review" as of the moment in my ESRI.  Even that site is having issues.  I will check the link again on Monday to see if it is back up or if it needs updated.  

AlinaTaus
Frequent Contributor

Hello,

I am curious if you were able to resolve your issue. I am experiencing the exact same error when running a geoprocessing service that's based on a Python script that uses the featurelayer.query method. We noticed this error started popping up after we upgraded to ArcGIS Server 11.3. For ArcPro we are using 3.3.2.

The BUG you referenced is currently marked as "non-reproducible", but it is definitely still an issue. I even uninstalled my current version of Pro and installed an older version, ArcPro 3.0.6 and was able to run the script with no errors. Does anybody know if this is an issue at Server 11.4?

0 Kudos
LanceCole
MVP Regular Contributor

@AlinaTaus,

This was resolved either when we upgraded to ArcGIS Pro 3.4 and/or Enterprise 11.4.  I recall testing this with each new version/patch for quite some time.  I do not have access to my testing notes but I believe it was Pro 3.4 that finally addressed the issue in our scripts.  

I also believe we changed the function we used as new options were available.  I will try and remember to look through my notes tomorrow and look at the script update logs.

0 Kudos