Skip to content

OfflineContentManager export_items fails for "Table (hosted)" feature service #2456

Open

Description

@knoopum

Describe the bug
When using OfflineContentManager's export_items method, it fails unexpectedly for a "Table (hosted)" feature service. (See error message below.)

To Reproduce

  1. Create a Table (hosted) either by uploading a simple CSV file or via Content --> New item.
  2. Attempting to make an offline backup of the item using export_items produces the following error:
C:\Users\knoop\AppData\Local\ESRI\conda\envs\work\Lib\site-packages\arcgis\apps\itemgraph\_migration.py:149: RuntimeWarning: Failed to export item b570d7c8577042d891d4eb09d348f331 due to error: <Table url:"https://services1.arcgis.com/4ezfu5dIwH83BUNL/arcgis/rest/services/OCM_export_items_csv/FeatureServer/0"> is not JSON serializable. Deleting folder and skipping...
  warnings.warn(

The above error message looks to have truncated prematurely as well.

Expected behavior
I expect export_items to be able to successfully export a "Table (hosted)" feature service.

Platform (please complete the following information):
Python API version 2.4.2

Activity

  1. achapkowski commented on Feb 23, 2026

    @achapkowski
    Contributor

    I cannot reproduce this issue with ArcGIS Online, please provide sample data and reproducible code.

    from arcgis.gis import GIS, Item, ContentManager
    gis = GIS(profile='your_online_profile', verify_cert=False, trust_env=True)
    item: Item = gis.content.get('abc1234') # hosted table
    cm: ContentManager = gis.content
    result = cm.offline.export_items(items=[item], output_folder=r"c:\temp", package_name="tableexport")
    
  2. added
    cannot reproducecannot reproduce the error/bug/issue
    and removed on Feb 23, 2026
  3. knoopum commented on Feb 23, 2026

    @knoopum
    Author

    @achapkowski The error occurs with a Table (hosted) on ArcGIS Online.

    The example Table (hosted) in the snippet below is shared publicly, but owned by a different user than the admin user running the code.

    import arcgis
    from arcgis import GIS
    import os
    import pandas
    
    # Connect to ArcGIS Online organization as an admin user
    gis = GIS(profile="xxxxxxxx")  
    
    # Items to backup (publicly shared)
    items = [
        gis.content.get('b570d7c8577042d891d4eb09d348f331')
    ]
    display(pandas.DataFrame(items, columns=["id","type","typeKeywords","title"]))
    
    # Export offline backup package
    package_path = gis.content.offline.export_items(
        items = items,
        output_folder = os.getcwd(),
        package_name = "ocm_tile_layer_hosted",
    )
    print(package_path)
  4. achapkowski commented on Feb 24, 2026

    @achapkowski
    Contributor

    @knoopum thanks for the code snippet, I'll test it out

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

cannot reproducecannot reproduce the error/bug/issue

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions