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:
<SPAN class="keyword token">from</SPAN> arcgis<SPAN class="punctuation token">.</SPAN>gis <SPAN class="keyword token">import</SPAN> GIS
<SPAN class="comment token"># Login </SPAN>
arcgis_username <SPAN class="operator token">=</SPAN> <SPAN class="string token">""</SPAN>
arcgis_password <SPAN class="operator token">=</SPAN> <SPAN class="string token">""</SPAN>
gis <SPAN class="operator token">=</SPAN> GIS<SPAN class="punctuation token">(</SPAN><SPAN class="string token">"http://rhk.maps.arcgis.com"</SPAN><SPAN class="punctuation token">,</SPAN> arcgis_username<SPAN class="punctuation token">,</SPAN> arcgis_password<SPAN class="punctuation token">)</SPAN>
<SPAN class="comment token"># item is a map journal app </SPAN>
item <SPAN class="operator token">=</SPAN> gis<SPAN class="punctuation token">.</SPAN>content<SPAN class="punctuation token">.</SPAN>get<SPAN class="punctuation token">(</SPAN><SPAN class="string token">"6116f1493f214bed8018a4e62e4a8324"</SPAN><SPAN class="punctuation token">)</SPAN>
item_data <SPAN class="operator token">=</SPAN> item<SPAN class="punctuation token">.</SPAN>get_data<SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN>
item<SPAN class="punctuation token">.</SPAN>update<SPAN class="punctuation token">(</SPAN>data<SPAN class="operator token">=</SPAN>item_data<SPAN class="punctuation token">)</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>
<SPAN class=""><BR /></SPAN>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?