PSU-CSAR / awdb-retrieve

Automation script to download station metadata records from the NRCS Air Water Database.
1 stars 1 forks source link

Unexpected keyword argument 'method_whitelist' #8

Closed lbross closed 1 year ago

lbross commented 1 year ago

Got this stacktrace when running get_AWDB_stations_3.py on CS1 which is running ArcGIS Pro 3.1.1.

Creating SD file
Traceback (most recent call last):
  File "C:\workspace\awdb-retrieve\get_AWDB_stations_3.py", line 943, in <module>
    sys.exit(main())
  File "C:\workspace\awdb-retrieve\get_AWDB_stations_3.py", line 866, in main
    update_ags_online_fs.update_feature_services(settings.PRO_PROJECT_PATH, fc_name)
  File "C:\workspace\awdb-retrieve\update_ags_online_fs.py", line 57, in update_feature_services
    gis = GIS(settings.AGO_PORTAL, settings.AGO_USER, settings.AGO_PASSWORD)
  File "C:\Users\lbross\AppData\Local\ESRI\conda\envs\arcgispro-py3-awdb\lib\site-packages\arcgis\gis\__init__.py", line 585, in __init__
    raise e
  File "C:\Users\lbross\AppData\Local\ESRI\conda\envs\arcgispro-py3-awdb\lib\site-packages\arcgis\gis\__init__.py", line 524, in __init__
    self._portal = _portalpy.Portal(
  File "C:\Users\lbross\AppData\Local\ESRI\conda\envs\arcgispro-py3-awdb\lib\site-packages\arcgis\gis\_impl\_portalpy.py", line 205, in __init__
    self.con = Connection(
  File "C:\Users\lbross\AppData\Local\ESRI\conda\envs\arcgispro-py3-awdb\lib\site-packages\arcgis\gis\_impl\_con\_connection.py", line 344, in __init__
    self._create_session()
  File "C:\Users\lbross\AppData\Local\ESRI\conda\envs\arcgispro-py3-awdb\lib\site-packages\arcgis\gis\_impl\_con\_connection.py", line 521, in _create_session
    max_retries=Retry(
TypeError: __init__() got an unexpected keyword argument 'method_whitelist'
lbross commented 1 year ago

Found this posting on ESRI forums about incompatibility introduced with later versions of Python supporting libraries: requests, urllib3. Used pip and requirements.txt to rollback libraries to versions suggested by the ESRI forum.