Select to view content in your preferred language

file = gis.content.add( >> Exception: Item type not valid.

52
1
Jump to solution
5 hours ago
Labels (2)
CS_IBM
by
New Contributor III

Greetings,
I am trying to upload an EXB zipped file into AGOL based on an ESRI example for a shapefile. https://developers.arcgis.com/python/api-reference/arcgis.gis.toc.html?

The Item type is "type": "Experience Builder",

The code creates and Experience Builder App, then fails. The error message is:
File "C:\Upload_Access.py", line 24, in <module>
file = gis.content.add(

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
raise Exception(errormessage)
Exception: Item type not valid.
(Error Code: 400)

Exception: Item type not valid.
(Error Code: 400)

 

The code is:

countryside=r"C:\Temp\EXB.zip"

### Upload zipped EXB
file = gis.content.add(
item_properties = {
"type": "Experience Builder",
"title": "Upload Test",
"description": "Countryside",
"tags": "Access",
},
#data = WebExperience,
data = countryside,
)


I would appreciate assistance to resolve the issue.
Thanks
Clive

0 Kudos
1 Solution

Accepted Solutions
CodyPatterson
Regular Contributor

Hey @CS_IBM 

Instead of using "Experience Builder" as the type, could you try "Web Experience"?

From the documentation linked, it doesn't seem as there is an Experience Builder type, maybe Web Experience would do the trick!

Cody

 

View solution in original post

0 Kudos
1 Reply
CodyPatterson
Regular Contributor

Hey @CS_IBM 

Instead of using "Experience Builder" as the type, could you try "Web Experience"?

From the documentation linked, it doesn't seem as there is an Experience Builder type, maybe Web Experience would do the trick!

Cody

 

0 Kudos