Select to view content in your preferred language

ArcGIS Online and Arcpy

309
12
2 weeks ago
CodyPatterson
Regular Contributor

Hey all,

I was recently given the project to put together a tool that syncs our AGOL environment to our local database and vice versa. This was already created a few years back by another employee but it recent started failing. I found that it was using arcpy.ListFields(SourceLayer) and it now shows that {AGOL_URL} does not exist or is not supported.

I attempted many ideas to get this to continue working with ArcPy, but I've been stuck for a few hours now, and have decided to look back into ArcGIS API for Python to get this completed.

My idea was to bring down the FGDB into a local file, and then use that with ArcPy, but the FGDB is 100+ GB and I cannot do this often. How should I approach this?

Any help is appreciated, thank you!

Cody

0 Kudos
12 Replies
JakeSkinner
Esri Esteemed Contributor

@CodyPatterson,

Yes, this worked for me:

JakeSkinner_0-1719948979977.png

 

CodyPatterson
Regular Contributor

Hey @JakeSkinner 

That is extremely strange, not entirely sure what I'm doing wrong, but I suppose I'll just make a support ticket regarding it. I log into AGOL with these credentials and I'm responding to you currently with them, there is no reason that it shouldn't work, but for some reason it isn't. Thank you for your continual responses and suggestions, but I'll respond with updates that support hands out!

Edit:

I attempted to copy exactly what you had, I'm not sure where your function came from that had the underscore, mine only worked with the .managment.MakeFeatureLayer(), but I printed the Sign In, and it showed me the token, referrer, and expiry without issue, but still stated it did not exist.

CodyPatterson_0-1720005295419.png

 

Cody

0 Kudos
CodyPatterson
Regular Contributor

Hey @JakeSkinner 

A little update, it seems that this is associated with BUG-000144037 and seems inconsistent, an ESRI tech stated that they were able to replicate the issue and not replicate the issue depending on the day. This seems as if it was classified as a Known Limit, which I assume means it will not be further worked on, but I am confused on how this falls out of ESRI reach as it is ArcPy, an ESRI tool, and ArcGIS API for Python, again an ESRI tool, contacting ArcGIS Online, which is yet again an ESRI tool. I'm asking for clarification within the ticket, but it seems as if this is just something quite strange.

Cody

0 Kudos