You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I recently upgraded my arcgis python library from 2.3.0 -> 2.4.0 and noticed the deprecation warning on the function gis.content.add(). According to the message, that function should still be available until 3.0.0 but it throws a confusing error instead. My goal is to add a GeoJSON item into the root of my account with the Organization sharing level.
To save time I updated my code to the recommended function gis.content.folder.add(). To use the new Folder.add() function I created an ItemProperties object. The issue is that I don't see a way to replicate the access parameter of the previous item_properties dictionary. I would like to set whatever the corresponding parameter is in the ItemProperties object to org but the closest thing I can find in the parameter list is access_information but that does not seem to do anything.
To Reproduce
Steps to reproduce the behavior:
defupload(data: str) ->Item:
item_props=ItemProperties(
title="My Title",
item_type=ItemTypeEnum.GEOJSON.value,
file_name="myfile.geojson",
access_information="org",
)
LOGGER.info("publishing item")
folders_obj=gis.content.foldersitem_folder=folders_obj.get() # root folder of logged-in user is returnedadd_job=item_folder.add(item_properties=item_props, file=io.StringIO(data))
returnadd_job.result()
error:
The GeoJSON item is added at the Owner sharing level instead of Organization in ArcGIS Online.
Screenshots
After I call the gis.content.add() function, the GeoJSON item should have the org icon (the one in the red box) next to it in the UI but it instead has the "person" icon indicating the Owner sharing level.
Expected behavior
For my GeoJSON item to be created with the org sharing level
Platform (please complete the following information):
OS: MacOS Sonoma
Browser: Google Chrome
Python API Version: 2.4.0
The text was updated successfully, but these errors were encountered:
sogunsemi
changed the title
Cannot set sharing level using new ItemProperties object of gis.folder.add() function
Cannot set sharing level using new ItemProperties object of gis.content.folder.add() function
Oct 23, 2024
Describe the bug
I recently upgraded my
arcgis
python library from 2.3.0 -> 2.4.0 and noticed the deprecation warning on the functiongis.content.add()
. According to the message, that function should still be available until3.0.0
but it throws a confusing error instead. My goal is to add a GeoJSON item into the root of my account with theOrganization
sharing level.To save time I updated my code to the recommended function
gis.content.folder.add()
. To use the newFolder.add()
function I created anItemProperties
object. The issue is that I don't see a way to replicate theaccess
parameter of the previousitem_properties
dictionary. I would like to set whatever the corresponding parameter is in theItemProperties
object toorg
but the closest thing I can find in the parameter list isaccess_information
but that does not seem to do anything.To Reproduce
Steps to reproduce the behavior:
error:
The GeoJSON item is added at the
Owner
sharing level instead ofOrganization
in ArcGIS Online.Deprecation warning for
gis.content.add()
:Error message I get when I try to use the
gis.content.add()
function:Screenshots
After I call the
gis.content.add()
function, the GeoJSON item should have theorg
icon (the one in the red box) next to it in the UI but it instead has the "person" icon indicating theOwner
sharing level.Expected behavior
For my GeoJSON item to be created with the
org
sharing levelPlatform (please complete the following information):
2.4.0
The text was updated successfully, but these errors were encountered: