FS Overwrite script stopped working after updating to pro v3.03 - SSL Error

4540
13
Jump to solution
12-12-2022 12:01 PM
BrandonBoisvert
Regular Contributor

I have a script to overwrite a hosted feature layer which had been successful everyday for the past year but has stopped working after updating Pro to v3.03. Any ideas to get it working again would be great...I am not a developer so I am really unsure of how to proceed.

The script:

from arcgis.gis import GIS
from arcgis.features import FeatureLayerCollection

#LOG INTO ARGIS ONLINE ORGANIZATION
OrgURL = "my orgs url"
adminUserName = "my user name"
orgpass = "my password"

gis = GIS(OrgURL, username=adminUserName, password=orgpass)

#POINT TOWARDS LOCAL LAYER
LOC = "layers location on my computer"

#FIND FEATURE LAYER USING IT'S ID
ID_Points_ONLINE = gis.content.search("id: Hosted Layer's ID #")
flc_Points_ONLINE = FeatureLayerCollection.fromitem(ID_Points_ONLINE[0])

#OVERWRITE FEATURE LAYER
flc_Points_ONLINE.manager.overwrite(LOC)

Error:

SSLError(
requests.exceptions.SSLError: Please set verify_cert=False due to encountered SSL error: HTTPSConnectionPool(host='bedfordnh.maps.arcgis.com', port=443): Max retries exceeded with url: /sharing/rest/oauth2/authorize?response_type=code&client_id=arcgisonline&redirect_uri=urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoob&state=1ShzDhlkPgkir63Mm0WO9gvXOa49ZX&expiration=20160&allow_verification=false&style=dark&locale=en-US (Caused by SSLError(SSLError(1, '[SSL: UNSAFE_LEGACY_RENEGOTIATION_DISABLED] unsafe legacy renegotiation disabled (_ssl.c:1129)')))

 

Note: I have followed the "Please set verify_cert=False" instruction but that doesn't seem to change the outcome

13 Replies
WenfengLi
Occasional Contributor

Thank you fklotz, this work around solution works great for us. Esri Support Case #03202119. My question is if it is an identified bug, when ESRI will have a patch for it? Thank you.

0 Kudos
fklotz
by
Regular Contributor

In my experience, we never really know when the bug will be addressed.  If you have support, you can submit a case and have the bug attached to it so you can subscribe to the case and be notified about the status of the bug.

Farley
MikaelJ
New Contributor

 @fklotz  Farley, amazing in depth analysis! Thank you so much!

I agree 100% with you that switching OpenSSL version in minor version shouldn't be done.

Can you share BUG number? 

In my organization we are facing the same issue. Going through unsafe workaround is out of the discussion.

Kind regards!

0 Kudos
fklotz
by
Regular Contributor

Hi Mikael:  This is listed as BUG-000155115 

Bug Description:
Python that ships with ArcGIS Pro 3.0.2+ (3.9.11) is not compatible with the version of openssl (3.0.7) that ships with ArcGIS Pro 3.0.2+ when firewalls don't support SSL redirection; produces error "SSL: UNSAFE_LEGACY_RENEGOTIATION_DISABLED" in Python Command Prompt

The workaround listed in the bug points back to this ESRI Community Posting.

Last update on the bug is currently 2023-02-14, I guess ESRI gave it a little love on Valentines day. It's status  listed as "under consideration".

Farley
0 Kudos