<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: ArcGIS Online User Content Issue in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/arcgis-online-user-content-issue/m-p/197694#M9751</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hey,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Have you found any solution for this? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have the same problem with:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; url = urljoin(AGOL, 'sharing/rest/portals/self')&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; params = {'f': 'json', 'token': token}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; request = urllib2.Request(url=url, data=urllib.urlencode(params))&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; r = urllib2.urlopen(request).read()&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;gt; IncompleteRead: IncompleteRead(303 bytes read)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I get the same code to work great with Portal for ArcGIS. Just doesnt work for ArcGIS Online.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 16 Oct 2013 09:04:36 GMT</pubDate>
    <dc:creator>TonyGegner</dc:creator>
    <dc:date>2013-10-16T09:04:36Z</dc:date>
    <item>
      <title>ArcGIS Online User Content Issue</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcgis-online-user-content-issue/m-p/197693#M9750</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have built automatic procedures using Python to create, delete, update, etc items on ArcGIS Online using its REST API.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Everything seems to work fine to the exception of one function.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Goal: List all the items inside of a folder in AGOL for Organizations&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Because it doesn't seem to exist a method to list the items using the folders name I first need to make a request to get all the folders associated with my account/user to get their id. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;That is done by invoking the URL below:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://www.arcgis.com/sharing/rest/content/users/someuser"&gt;http://www.arcgis.com/sharing/rest/content/users/someuser&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp; (the token and f=json are also added as request parameters)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Everything works fine. After discovering the ID of the folder I then issue a second request as follows:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://www.arcgis.com/sharing/rest/content/users/someuser/some_folder_guid"&gt;http://www.arcgis.com/sharing/rest/content/users/someuser/some_folder_guid&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp; (the token and f=json are also added as request parameters)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;and I get the following error:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;IncompleteRead(495 bytes read)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The call in Python is as follows:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt;urllib2.urlopen('&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://www.arcgis.com/sharing/rest/content/users/" rel="nofollow" target="_blank"&gt;https://www.arcgis.com/sharing/rest/content/users/&lt;/A&gt;&lt;SPAN&gt;' + portal_user + '/' + folder_id, urllib.urlencode(args)).read()&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What actually happens is that read() function is what is taking more time. The code above is standard in python. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I have tested copying the request, args, and token into a browser and it seems to be returning the json properly.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If I catch the exception (e.g. except httplib.IncompleteRead, e &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; and return the e.partial info it seems to have the entire json response. The problem is that it takes almost 1 minute to read it ... and I only have 1 item inside the folder. All other methods in AGOL seem to be fast except this one which is giving an exception...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can you guys see why only this method is not working properly?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The create webmap, delete items, etc operations seems to be working properly ...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Jose Sousa&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If I try to list the items&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Jul 2013 04:58:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcgis-online-user-content-issue/m-p/197693#M9750</guid>
      <dc:creator>JoseSousa</dc:creator>
      <dc:date>2013-07-05T04:58:25Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Online User Content Issue</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcgis-online-user-content-issue/m-p/197694#M9751</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hey,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Have you found any solution for this? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have the same problem with:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; url = urljoin(AGOL, 'sharing/rest/portals/self')&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; params = {'f': 'json', 'token': token}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; request = urllib2.Request(url=url, data=urllib.urlencode(params))&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; r = urllib2.urlopen(request).read()&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;gt; IncompleteRead: IncompleteRead(303 bytes read)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I get the same code to work great with Portal for ArcGIS. Just doesnt work for ArcGIS Online.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Oct 2013 09:04:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcgis-online-user-content-issue/m-p/197694#M9751</guid>
      <dc:creator>TonyGegner</dc:creator>
      <dc:date>2013-10-16T09:04:36Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Online User Content Issue</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcgis-online-user-content-issue/m-p/197695#M9752</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Got a solution for you.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Request f=pjson works generally when its possible.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Otherwise you need to fix the bad requests from the server and rebuild the chunks.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You can do that by adding:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;def patch_http_response_read(func):
&amp;nbsp;&amp;nbsp;&amp;nbsp; def inner(*args):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; try:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return func(*args)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; except httplib.IncompleteRead, e:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return e.partial
&amp;nbsp;&amp;nbsp;&amp;nbsp; return inner

httplib.HTTPResponse.read = patch_http_response_read(httplib.HTTPResponse.read)&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 09:52:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcgis-online-user-content-issue/m-p/197695#M9752</guid>
      <dc:creator>TonyGegner</dc:creator>
      <dc:date>2021-12-11T09:52:21Z</dc:date>
    </item>
  </channel>
</rss>

