laptop and a wrench

Bug

Updating the item data with the BytesIO object returns the error message "Error 409: Item with file already exists".

ArcGIS API for Python
Bug-ID-Nummer BUG-000161855
EingereichtOctober 4, 2023
Zuletzt geändertJune 5, 2024
Gilt fürArcGIS API for Python
Gefunden in VersionN/A
BetriebssystemWindows Server
BetriebssystemversionN/A
StatusNon-Reproducible

Zusätzliche Informationen

This issue is not reproducible.

Workaround

Currently, the fileName is resolved as follows in src/arcgis/gis/__init__.py:14909

           if data is not None and isinstance(data, (io.StringIO, io.BytesIO)):

               if item_properties is None:

                   item_properties =

               if not "type" in item_properties:

                   item_properties["type"] = self.type

               if not "fileName" in item_properties:

                   fileName = self.name

                   item_properties["fileName"] = fileName

Consider using a random filename, or appending a timestamp to the end of the itemId as a filename.

           if data is not None and isinstance(data, (io.StringIO, io.BytesIO)):

               if item_properties is None:

                   item_properties =

               if not "type" in item_properties:

                   item_properties["type"] = self.type

               if not "fileName" in item_properties:

                   fileName = f"self.name_str(round((datetime.now()).timestamp()))"

                   item_properties["fileName"] = fileName

Schritte zur Reproduzierung

Bug-ID: BUG-000161855

Software:

  • ArcGIS API for Python

Benachrichtigung erhalten, wenn sich der Status eines Bugs ändert

Esri Support App herunterladen

Weitere Informationen zu diesem Thema erkunden

Unterstützung durch ArcGIS-Experten anfordern

An den technischen Support wenden

Esri Support App herunterladen

Zu Download-Optionen wechseln