<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: AttributeError: 'ContentManager' object has no attribute 'folders' in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/attributeerror-contentmanager-object-has-no/m-p/1613726#M11368</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/514069"&gt;@ODWC_GIS&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;What version of the API are you using?&lt;/P&gt;&lt;LI-CODE lang="python"&gt;import arcgis

print(arcgis.__version__)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You do not need to use the Folders class add(), it is simply a deprecation warning, not a removal error. I am using version 2.4.0 and although the Folder class is available, I can still use the ContentManager add() method just fine, but with the deprecation warning.&lt;/P&gt;&lt;P&gt;Your&amp;nbsp;&lt;STRONG&gt;gis.content.add() &lt;/STRONG&gt;is still good to use to add content to your ArcGIS Online - you'll just get the deprecation warning that at version 3.0.0 it will be removed.&lt;/P&gt;&lt;P&gt;You are getting&amp;nbsp;&lt;STRONG&gt;AttributeError: 'ContentManager' object has no attribute 'folders' &lt;/STRONG&gt;because you are at an API version that doesn't have that functionality, my guess is 2.1.0.1 or 2.2.0.1 (or in or around).&lt;/P&gt;&lt;P&gt;I hope that helps.&lt;/P&gt;&lt;P&gt;All the best,&lt;/P&gt;&lt;P&gt;Glen&lt;/P&gt;</description>
    <pubDate>Mon, 12 May 2025 17:26:34 GMT</pubDate>
    <dc:creator>Clubdebambos</dc:creator>
    <dc:date>2025-05-12T17:26:34Z</dc:date>
    <item>
      <title>AttributeError: 'ContentManager' object has no attribute 'folders'</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/attributeerror-contentmanager-object-has-no/m-p/1613717#M11365</link>
      <description>&lt;P&gt;Attempting to run one of Dublin, OH's useful Assessment Notebooks.&lt;/P&gt;&lt;P&gt;Was already informed by the Error Text that&amp;nbsp;&lt;STRONG&gt;gis.content.add()&lt;/STRONG&gt; has been deprecated, and that I must use the &lt;STRONG&gt;Folder.add()&lt;/STRONG&gt; class/method to add X item to an ArcGIS Online Folder that gets to be specified by me.&lt;/P&gt;&lt;P&gt;So I attempted to set the specified folder, but am admonished:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;AttributeError: 'ContentManager' object has no attribute 'folders'&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Despite the Documentation telling me otherwise:&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/python/latest/api-reference/arcgis.gis.toc.html#folder" target="_self"&gt;https://developers.arcgis.com/python/latest/api-reference/arcgis.gis.toc.html#folder&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class=""&gt;# Usage Example:&lt;/SPAN&gt;
&lt;SPAN class=""&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/SPAN&gt; &lt;SPAN class=""&gt;from&lt;/SPAN&gt; &lt;SPAN class=""&gt;arcgis.gis&lt;/SPAN&gt; &lt;SPAN class=""&gt;import&lt;/SPAN&gt; &lt;SPAN class=""&gt;GIS&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt; &lt;SPAN class=""&gt;ItemProperties&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt; &lt;SPAN class=""&gt;ItemTypeEnum&lt;/SPAN&gt;

&lt;SPAN class=""&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/SPAN&gt; &lt;SPAN class=""&gt;gis&lt;/SPAN&gt; &lt;SPAN class=""&gt;=&lt;/SPAN&gt; &lt;SPAN class=""&gt;GIS&lt;/SPAN&gt;&lt;SPAN class=""&gt;(&lt;/SPAN&gt;&lt;SPAN class=""&gt;profile&lt;/SPAN&gt;&lt;SPAN class=""&gt;=&lt;/SPAN&gt;&lt;SPAN class=""&gt;"your_organization_profile"&lt;/SPAN&gt;&lt;SPAN class=""&gt;)&lt;/SPAN&gt;

&lt;SPAN class=""&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/SPAN&gt; &lt;SPAN class=""&gt;data_path&lt;/SPAN&gt; &lt;SPAN class=""&gt;=&lt;/SPAN&gt; &lt;SPAN class=""&gt;r&lt;/SPAN&gt;&lt;SPAN class=""&gt;"&amp;lt;path_to_zipped_shapefile&amp;gt;"&lt;/SPAN&gt;
&lt;SPAN class=""&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/SPAN&gt; &lt;SPAN class=""&gt;item_props&lt;/SPAN&gt; &lt;SPAN class=""&gt;=&lt;/SPAN&gt; &lt;SPAN class=""&gt;ItemProperties&lt;/SPAN&gt;&lt;SPAN class=""&gt;(&lt;/SPAN&gt;&lt;SPAN class=""&gt;title&lt;/SPAN&gt;&lt;SPAN class=""&gt;=&lt;/SPAN&gt;&lt;SPAN class=""&gt;"new_shapefile_item"&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt;
                                &lt;SPAN class=""&gt;item_type&lt;/SPAN&gt;&lt;SPAN class=""&gt;=&lt;/SPAN&gt;&lt;SPAN class=""&gt;ItemTypeEnum&lt;/SPAN&gt;&lt;SPAN class=""&gt;.&lt;/SPAN&gt;&lt;SPAN class=""&gt;SHAPEFILE&lt;/SPAN&gt;&lt;SPAN class=""&gt;.&lt;/SPAN&gt;&lt;SPAN class=""&gt;value&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt;
                                &lt;SPAN class=""&gt;tags&lt;/SPAN&gt;&lt;SPAN class=""&gt;=&lt;/SPAN&gt;&lt;SPAN class=""&gt;"new_shp_item,from_api"&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt;
                                &lt;SPAN class=""&gt;snippet&lt;/SPAN&gt;&lt;SPAN class=""&gt;=&lt;/SPAN&gt;&lt;SPAN class=""&gt;"Demo item added from Python API"&lt;/SPAN&gt;&lt;SPAN class=""&gt;)&lt;/SPAN&gt;

&lt;SPAN class=""&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/SPAN&gt; &lt;STRONG&gt;&lt;SPAN class=""&gt;folders_obj&lt;/SPAN&gt; &lt;SPAN class=""&gt;=&lt;/SPAN&gt; &lt;SPAN class=""&gt;gis&lt;/SPAN&gt;&lt;SPAN class=""&gt;.&lt;/SPAN&gt;&lt;SPAN class=""&gt;content&lt;/SPAN&gt;&lt;SPAN class=""&gt;.&lt;/SPAN&gt;&lt;SPAN class=""&gt;folders&lt;/SPAN&gt;&lt;/STRONG&gt;
&lt;SPAN class=""&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/SPAN&gt; &lt;SPAN class=""&gt;item_folder&lt;/SPAN&gt; &lt;SPAN class=""&gt;=&lt;/SPAN&gt; &lt;SPAN class=""&gt;folders_obj&lt;/SPAN&gt;&lt;SPAN class=""&gt;.&lt;/SPAN&gt;&lt;SPAN class=""&gt;get&lt;/SPAN&gt;&lt;SPAN class=""&gt;(&lt;/SPAN&gt;&lt;SPAN class=""&gt;folder&lt;/SPAN&gt;&lt;SPAN class=""&gt;=&lt;/SPAN&gt;&lt;SPAN class=""&gt;"water_data"&lt;/SPAN&gt;&lt;SPAN class=""&gt;)&lt;/SPAN&gt;

&lt;SPAN class=""&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/SPAN&gt; &lt;SPAN class=""&gt;add_job&lt;/SPAN&gt; &lt;SPAN class=""&gt;=&lt;/SPAN&gt; &lt;SPAN class=""&gt;item_folder&lt;/SPAN&gt;&lt;SPAN class=""&gt;.&lt;/SPAN&gt;&lt;SPAN class=""&gt;add&lt;/SPAN&gt;&lt;SPAN class=""&gt;(&lt;/SPAN&gt;&lt;SPAN class=""&gt;item_properties&lt;/SPAN&gt;&lt;SPAN class=""&gt;=&lt;/SPAN&gt;&lt;SPAN class=""&gt;item_props&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt;
                              &lt;SPAN class=""&gt;file&lt;/SPAN&gt;&lt;SPAN class=""&gt;=&lt;/SPAN&gt;&lt;SPAN class=""&gt;data_path&lt;/SPAN&gt;&lt;SPAN class=""&gt;)&lt;/SPAN&gt;
&lt;SPAN class=""&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/SPAN&gt; &lt;SPAN class=""&gt;if&lt;/SPAN&gt; &lt;SPAN class=""&gt;not&lt;/SPAN&gt; &lt;SPAN class=""&gt;add_job&lt;/SPAN&gt;&lt;SPAN class=""&gt;.&lt;/SPAN&gt;&lt;SPAN class=""&gt;done&lt;/SPAN&gt;&lt;SPAN class=""&gt;():&lt;/SPAN&gt;
&lt;SPAN class=""&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;     &lt;SPAN class=""&gt;print&lt;/SPAN&gt;&lt;SPAN class=""&gt;(&lt;/SPAN&gt;&lt;SPAN class=""&gt;"...job precessing..."&lt;/SPAN&gt;&lt;SPAN class=""&gt;)&lt;/SPAN&gt;
&lt;SPAN class=""&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/SPAN&gt; &lt;SPAN class=""&gt;else&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt;
&lt;SPAN class=""&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;     &lt;SPAN class=""&gt;new_shp_item&lt;/SPAN&gt; &lt;SPAN class=""&gt;=&lt;/SPAN&gt; &lt;SPAN class=""&gt;add_job&lt;/SPAN&gt;&lt;SPAN class=""&gt;.&lt;/SPAN&gt;&lt;SPAN class=""&gt;result&lt;/SPAN&gt;&lt;SPAN class=""&gt;()&lt;/SPAN&gt;

&lt;SPAN class=""&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/SPAN&gt; &lt;SPAN class=""&gt;new_flyr_item&lt;/SPAN&gt; &lt;SPAN class=""&gt;=&lt;/SPAN&gt; &lt;SPAN class=""&gt;new_shp_item&lt;/SPAN&gt;&lt;SPAN class=""&gt;.&lt;/SPAN&gt;&lt;SPAN class=""&gt;publish&lt;/SPAN&gt;&lt;SPAN class=""&gt;()&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;I did find this User on GitHub with the same issue, but their solution (upgrading ArcGIS Pro to 3.4) is not a viable option for me:&amp;nbsp;&amp;nbsp;&lt;A href="https://github.com/Esri/arcgis-python-api/issues/2268" target="_blank" rel="noopener"&gt;ContentManager.folders does not work as documented · Issue #2268 · Esri/arcgis-python-api&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I can barely follow the script I'm trying to triage as it is.&amp;nbsp; I'm not a developer.&amp;nbsp; But any offered solution would be appreciated --just know that I may not understand complexities beyond adding/substituting lines of python in the Notebook I'm following.&lt;/P&gt;</description>
      <pubDate>Mon, 12 May 2025 16:59:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/attributeerror-contentmanager-object-has-no/m-p/1613717#M11365</guid>
      <dc:creator>ODWC_GIS</dc:creator>
      <dc:date>2025-05-12T16:59:59Z</dc:date>
    </item>
    <item>
      <title>Re: AttributeError: 'ContentManager' object has no attribute 'folders'</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/attributeerror-contentmanager-object-has-no/m-p/1613726#M11368</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/514069"&gt;@ODWC_GIS&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;What version of the API are you using?&lt;/P&gt;&lt;LI-CODE lang="python"&gt;import arcgis

print(arcgis.__version__)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You do not need to use the Folders class add(), it is simply a deprecation warning, not a removal error. I am using version 2.4.0 and although the Folder class is available, I can still use the ContentManager add() method just fine, but with the deprecation warning.&lt;/P&gt;&lt;P&gt;Your&amp;nbsp;&lt;STRONG&gt;gis.content.add() &lt;/STRONG&gt;is still good to use to add content to your ArcGIS Online - you'll just get the deprecation warning that at version 3.0.0 it will be removed.&lt;/P&gt;&lt;P&gt;You are getting&amp;nbsp;&lt;STRONG&gt;AttributeError: 'ContentManager' object has no attribute 'folders' &lt;/STRONG&gt;because you are at an API version that doesn't have that functionality, my guess is 2.1.0.1 or 2.2.0.1 (or in or around).&lt;/P&gt;&lt;P&gt;I hope that helps.&lt;/P&gt;&lt;P&gt;All the best,&lt;/P&gt;&lt;P&gt;Glen&lt;/P&gt;</description>
      <pubDate>Mon, 12 May 2025 17:26:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/attributeerror-contentmanager-object-has-no/m-p/1613726#M11368</guid>
      <dc:creator>Clubdebambos</dc:creator>
      <dc:date>2025-05-12T17:26:34Z</dc:date>
    </item>
  </channel>
</rss>

