<?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 Content Search returns a JSON decode error when max_items is set to a big number in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/content-search-returns-a-json-decode-error-when/m-p/1296454#M8757</link>
    <description>&lt;P&gt;When I use the ArcGIS API for Python content manager's search method to get ArcGIS Portal contents based on content type, if I set the "max_items" to 300 or higher, most of the times, it would return a JSON decode error. But this error doesn't always occur. Sometimes, if I execute the same code, it works just fine. if I set "max_items" to 250 or below, usually it works without any issues. I don't see anything in the API documentation that mentions a limit for the "max_items" in content search. Anyone had this issue before? Is there any workarounds?&lt;/P&gt;&lt;P&gt;The JSON decode error I caught:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;JSONDecodeError('Expecting value: line 1 column 1 (char 0)')&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;The content search code:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;allMapImgLayers = gis.content.search(query='', item_type='Map Image Layer', max_items=500)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any suggestions would be appreciated! Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 06 Jun 2023 19:53:31 GMT</pubDate>
    <dc:creator>kevinblu</dc:creator>
    <dc:date>2023-06-06T19:53:31Z</dc:date>
    <item>
      <title>Content Search returns a JSON decode error when max_items is set to a big number</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/content-search-returns-a-json-decode-error-when/m-p/1296454#M8757</link>
      <description>&lt;P&gt;When I use the ArcGIS API for Python content manager's search method to get ArcGIS Portal contents based on content type, if I set the "max_items" to 300 or higher, most of the times, it would return a JSON decode error. But this error doesn't always occur. Sometimes, if I execute the same code, it works just fine. if I set "max_items" to 250 or below, usually it works without any issues. I don't see anything in the API documentation that mentions a limit for the "max_items" in content search. Anyone had this issue before? Is there any workarounds?&lt;/P&gt;&lt;P&gt;The JSON decode error I caught:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;JSONDecodeError('Expecting value: line 1 column 1 (char 0)')&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;The content search code:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;allMapImgLayers = gis.content.search(query='', item_type='Map Image Layer', max_items=500)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any suggestions would be appreciated! Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Jun 2023 19:53:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/content-search-returns-a-json-decode-error-when/m-p/1296454#M8757</guid>
      <dc:creator>kevinblu</dc:creator>
      <dc:date>2023-06-06T19:53:31Z</dc:date>
    </item>
  </channel>
</rss>

