I want to update an arcgis.gis.Item but not change the original. Running update on an item does alter the original. I tried item.copy but this makes a literal copy in portal which I do not want. I just want to copy in memory so that I can make changes without altering the original. What I really want is deepcopy...
But using copy or deepcopy immediately crashes my program without any error. Below demonstrates why I want to do this, in case there's concern around that.
Please note: this is a made up simplified demo example, so if I made any typos in the code by mistake here, don't infer those are connected to my local problem.
gis = GIS(url=url, username=username, password=password)
item = gis.content.get(some_id)
item_copy = copy.copy(item) # crashes the program, so does deepcopy
print("hello") # never runs further than prev line
item_copy.update({'title': 'New_Item_Title"})
gis.content.clone_items(items=[item_copy])
I don't understand why this kills the program, if it's an Esri error or an error with my environment, since there is no error message, except the exception __deepcopy_
If I can't use these copies is there another way to do this?