<?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 file = gis.content.add( &amp;gt;&amp;gt; Exception: Item type not valid. in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/file-gis-content-add-gt-gt-exception-item-type-not/m-p/1521375#M10426</link>
    <description>&lt;P&gt;Greetings,&lt;BR /&gt;I am trying to upload an EXB zipped file into AGOL based on an ESRI example for a shapefile.&amp;nbsp;&lt;A href="https://developers.arcgis.com/python/api-reference/arcgis.gis.toc.html?" target="_blank"&gt;https://developers.arcgis.com/python/api-reference/arcgis.gis.toc.html?&lt;/A&gt;&lt;/P&gt;&lt;P&gt;The Item type is&amp;nbsp;&lt;STRONG&gt;"type": "Experience Builder"&lt;/STRONG&gt;,&lt;/P&gt;&lt;P&gt;The code creates and Experience Builder App, then fails. The error message is:&lt;BR /&gt;File "C:\Upload_Access.py", line 24, in &amp;lt;module&amp;gt;&lt;BR /&gt;file = gis.content.add(&lt;BR /&gt;&lt;BR /&gt;File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\gis\_impl\_con\_connection.py", line 1023, in _handle_json_error&lt;BR /&gt;raise Exception(errormessage)&lt;BR /&gt;&lt;STRONG&gt;Exception: Item type not valid.&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;(Error Code: 400)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Exception: Item type not valid.&lt;BR /&gt;(Error Code: 400)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The code is:&lt;/P&gt;&lt;P&gt;countryside=r"C:\Temp\EXB.zip"&lt;/P&gt;&lt;P&gt;### Upload zipped EXB&lt;BR /&gt;file = gis.content.add(&lt;BR /&gt;item_properties = {&lt;BR /&gt;"type": "Experience Builder",&lt;BR /&gt;"title": "Upload Test",&lt;BR /&gt;"description": "Countryside",&lt;BR /&gt;"tags": "Access",&lt;BR /&gt;},&lt;BR /&gt;#data = WebExperience,&lt;BR /&gt;data = countryside,&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I would appreciate assistance to resolve the issue.&lt;BR /&gt;Thanks&lt;BR /&gt;Clive&lt;/P&gt;</description>
    <pubDate>Wed, 14 Aug 2024 10:40:29 GMT</pubDate>
    <dc:creator>CS_IBM</dc:creator>
    <dc:date>2024-08-14T10:40:29Z</dc:date>
    <item>
      <title>file = gis.content.add( &gt;&gt; Exception: Item type not valid.</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/file-gis-content-add-gt-gt-exception-item-type-not/m-p/1521375#M10426</link>
      <description>&lt;P&gt;Greetings,&lt;BR /&gt;I am trying to upload an EXB zipped file into AGOL based on an ESRI example for a shapefile.&amp;nbsp;&lt;A href="https://developers.arcgis.com/python/api-reference/arcgis.gis.toc.html?" target="_blank"&gt;https://developers.arcgis.com/python/api-reference/arcgis.gis.toc.html?&lt;/A&gt;&lt;/P&gt;&lt;P&gt;The Item type is&amp;nbsp;&lt;STRONG&gt;"type": "Experience Builder"&lt;/STRONG&gt;,&lt;/P&gt;&lt;P&gt;The code creates and Experience Builder App, then fails. The error message is:&lt;BR /&gt;File "C:\Upload_Access.py", line 24, in &amp;lt;module&amp;gt;&lt;BR /&gt;file = gis.content.add(&lt;BR /&gt;&lt;BR /&gt;File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\gis\_impl\_con\_connection.py", line 1023, in _handle_json_error&lt;BR /&gt;raise Exception(errormessage)&lt;BR /&gt;&lt;STRONG&gt;Exception: Item type not valid.&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;(Error Code: 400)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Exception: Item type not valid.&lt;BR /&gt;(Error Code: 400)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The code is:&lt;/P&gt;&lt;P&gt;countryside=r"C:\Temp\EXB.zip"&lt;/P&gt;&lt;P&gt;### Upload zipped EXB&lt;BR /&gt;file = gis.content.add(&lt;BR /&gt;item_properties = {&lt;BR /&gt;"type": "Experience Builder",&lt;BR /&gt;"title": "Upload Test",&lt;BR /&gt;"description": "Countryside",&lt;BR /&gt;"tags": "Access",&lt;BR /&gt;},&lt;BR /&gt;#data = WebExperience,&lt;BR /&gt;data = countryside,&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I would appreciate assistance to resolve the issue.&lt;BR /&gt;Thanks&lt;BR /&gt;Clive&lt;/P&gt;</description>
      <pubDate>Wed, 14 Aug 2024 10:40:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/file-gis-content-add-gt-gt-exception-item-type-not/m-p/1521375#M10426</guid>
      <dc:creator>CS_IBM</dc:creator>
      <dc:date>2024-08-14T10:40:29Z</dc:date>
    </item>
    <item>
      <title>Re: file = gis.content.add( &gt;&gt; Exception: Item type not valid.</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/file-gis-content-add-gt-gt-exception-item-type-not/m-p/1521379#M10427</link>
      <description>&lt;P&gt;Hey &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/760022"&gt;@CS_IBM&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Instead of using "Experience Builder" as the type, could you try "Web Experience"?&lt;/P&gt;&lt;P&gt;From the documentation linked, it doesn't seem as there is an Experience Builder type, maybe Web Experience would do the trick!&lt;/P&gt;&lt;P&gt;Cody&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Aug 2024 11:05:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/file-gis-content-add-gt-gt-exception-item-type-not/m-p/1521379#M10427</guid>
      <dc:creator>CodyPatterson</dc:creator>
      <dc:date>2024-08-14T11:05:53Z</dc:date>
    </item>
  </channel>
</rss>

