Select to view content in your preferred language

Recycle Bin

73
2
Jump to solution
yesterday
Labels (2)
cheyennecornett
New Contributor

I'm trying to interact with my orgs recycle bin via API for Python and I'm getting an error saying 

'User' object has no attribute 'recyclebin'

I'm using the verbiage from the documentation.

# Usage Example:

>>> gis = GIS(profile="your_online_profile")

>>> my_user = gis.users.me
>>> r_bin_content = my_user.recyclebin.content
>>> type(r_bin_content)

<class 'generator'>

>>> for r_item in r_bin_content:
        print(f"{r_item.properties['title']":15}{r_item.properties['type']}")

trees_sd        Service Definition
trees_flc       Feature Service

 

Has anyone been able to use the recycle bin via code? 

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
MobiusSnake
MVP

What version of the API are you using?  You can check using this:

arcgis.__version__

View solution in original post

0 Kudos
2 Replies
MobiusSnake
MVP

What version of the API are you using?  You can check using this:

arcgis.__version__
0 Kudos
cheyennecornett
New Contributor

That was the issue. I thought I was running the latest version. Fixed that and it works now, thank you  

0 Kudos