update data of arcgis app with python arcgis api

146
0
02-24-2020 11:27 PM
JeroenWinkelhorst
New Contributor

I created an web app in ArcGIS Online (map journal). I want to update the underlying data of the map journal (e.g. text) as a step in an automation workflow. However, i am unable to update the data. I isolated the problem to the following code:

from arcgis.gis import GIS 

# Login 
arcgis_username = "" 
arcgis_password = "" 
gis = GIS("http://rhk.maps.arcgis.com", arcgis_username, arcgis_password) 

# item is a map journal app 
item = gis.content.get("6116f1493f214bed8018a4e62e4a8324") 

item_data = item.get_data() 
item.update(data=item_data)‍‍‍‍‍‍‍‍‍

When i try to run this code i get an error:

File "C:\Anaconda3\envs\iReportAutomation\lib\urllib\request.py", line 1319, in do_open raise URLError(err) urllib.error.URLError:

I think a don't use the update function in a proper way. What am I doing wrong? And how can I update the data of an arcgis online app?

0 Replies