AnsweredAssumed Answered

Unable to update / delete user in ArcGIS Python API - HTTP 404 error

Question asked by ModernDesktop on Feb 3, 2020
Latest reply on Feb 10, 2020 by jskinner-esristaff

I am trying to update a user's description in our ArcGIS Portal instance but the below code is giving me an HTTP 404 error:

 

from arcgis.gis import GIS

 

gis = GIS("my_portal_url", "my_user", "my_password")
user = gis.users.get(username="chris.buckmaster")
user.update(description="Chris's Bio")

The error I receive is as follows:

Traceback (most recent call last):
File "test.py", line 5, in <module>
user.update(description="Chris's Bio")
File "C:\ProgramData\Anaconda3\lib\site-packages\arcgis\gis\__init__.py", line 5700, in update
files=files)
File "C:\ProgramData\Anaconda3\lib\site-packages\arcgis\_impl\connection.py", line 1107, in post
resp = opener.open(url, data=encoded_postdata.encode())
File "C:\ProgramData\Anaconda3\lib\urllib\request.py", line 531, in open
response = meth(req, response)
File "C:\ProgramData\Anaconda3\lib\urllib\request.py", line 641, in http_response
'http', request, response, code, msg, hdrs)
File "C:\ProgramData\Anaconda3\lib\urllib\request.py", line 569, in error
return self._call_chain(*args)
File "C:\ProgramData\Anaconda3\lib\urllib\request.py", line 503, in _call_chain
result = func(*args)
File "C:\ProgramData\Anaconda3\lib\urllib\request.py", line 649, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 404:

 

I can connect fine to the Portal and have been able to extract data out and produce reports etc so I am wondering why I might be receiving this error? I am using v1.6 of the ArcGIS Python API and Portal v10.6.

 

I am connecting as an administrator account so have full privileges.

 

Thanks

Outcomes