<?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: Add item 'NoneType' object is not subscriptable in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/add-item-nonetype-object-is-not-subscriptable/m-p/1501575#M70993</link>
    <description>&lt;P&gt;Try printing gis.content first to see if there is any content, then check to see if data exists and ...&lt;/P&gt;&lt;P&gt;Test for None using the principles here&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/t5/python-questions/typeerror-nonetype-object-is-not-iterable/m-p/1032815#M60189" target="_blank"&gt;Solved: TypeError: 'NoneType' object is not iterable - Esri Community&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 04 Jul 2024 15:42:19 GMT</pubDate>
    <dc:creator>DanPatterson</dc:creator>
    <dc:date>2024-07-04T15:42:19Z</dc:date>
    <item>
      <title>Add item 'NoneType' object is not subscriptable</title>
      <link>https://community.esri.com/t5/python-questions/add-item-nonetype-object-is-not-subscriptable/m-p/1501484#M70990</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am trying to automate stuff with python (I am using Jupyter through anaconda) and it's the first time using add an item with Arcgis api for python and I get this error when trying to add a Shapefile into my Enterprise portal.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;'NoneType' object is not subscriptable&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Is this related to the connection to the portal or to the add item?&lt;/P&gt;&lt;P&gt;The string for the connection doesn't give me any error, but the add function does.&lt;/P&gt;&lt;P&gt;Code is:&lt;/P&gt;&lt;P&gt;from arcgis.gis import GIS&lt;/P&gt;&lt;P&gt;gis = GIS(url="&lt;A href="https://something.cloud.esriuk.com/portal" target="_blank"&gt;https://something.cloud.esriuk.com/portal&lt;/A&gt;",&lt;BR /&gt;username="company\\emailaddressusedformyuser",&lt;BR /&gt;password="mypassword")&lt;/P&gt;&lt;P&gt;ip = {&lt;BR /&gt;"type" : "Shapefile",&lt;BR /&gt;"title" : "TEST",&lt;BR /&gt;"tags" : "test"&lt;BR /&gt;}&lt;BR /&gt;item = gis.content.add(data=r"data\TEST.zip", item_properties=ip)&lt;BR /&gt;item&lt;/P&gt;&lt;P&gt;Any suggestions would be higlhy appreciated, thanks.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jul 2024 09:29:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/add-item-nonetype-object-is-not-subscriptable/m-p/1501484#M70990</guid>
      <dc:creator>Iron_Mark</dc:creator>
      <dc:date>2024-07-04T09:29:42Z</dc:date>
    </item>
    <item>
      <title>Re: Add item 'NoneType' object is not subscriptable</title>
      <link>https://community.esri.com/t5/python-questions/add-item-nonetype-object-is-not-subscriptable/m-p/1501575#M70993</link>
      <description>&lt;P&gt;Try printing gis.content first to see if there is any content, then check to see if data exists and ...&lt;/P&gt;&lt;P&gt;Test for None using the principles here&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/t5/python-questions/typeerror-nonetype-object-is-not-iterable/m-p/1032815#M60189" target="_blank"&gt;Solved: TypeError: 'NoneType' object is not iterable - Esri Community&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jul 2024 15:42:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/add-item-nonetype-object-is-not-subscriptable/m-p/1501575#M70993</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2024-07-04T15:42:19Z</dc:date>
    </item>
    <item>
      <title>Re: Add item 'NoneType' object is not subscriptable</title>
      <link>https://community.esri.com/t5/python-questions/add-item-nonetype-object-is-not-subscriptable/m-p/1501762#M71002</link>
      <description>&lt;P&gt;Hi Dan,&lt;/P&gt;&lt;P&gt;Thank you for your reply.&lt;/P&gt;&lt;P&gt;What I get is an empty list [ ]&amp;nbsp; when I query for my user contents.&lt;/P&gt;&lt;P&gt;Any thoughts? I am using jupyter notebooks through Anaconda and we have an Enterprise authentication system.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jul 2024 09:39:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/add-item-nonetype-object-is-not-subscriptable/m-p/1501762#M71002</guid>
      <dc:creator>Iron_Mark</dc:creator>
      <dc:date>2024-07-05T09:39:53Z</dc:date>
    </item>
    <item>
      <title>Re: Add item 'NoneType' object is not subscriptable</title>
      <link>https://community.esri.com/t5/python-questions/add-item-nonetype-object-is-not-subscriptable/m-p/1501957#M71003</link>
      <description>&lt;P&gt;Sorry, I work on a local install.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jul 2024 17:50:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/add-item-nonetype-object-is-not-subscriptable/m-p/1501957#M71003</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2024-07-05T17:50:43Z</dc:date>
    </item>
    <item>
      <title>Re: Add item 'NoneType' object is not subscriptable</title>
      <link>https://community.esri.com/t5/python-questions/add-item-nonetype-object-is-not-subscriptable/m-p/1502985#M71014</link>
      <description>&lt;P&gt;Try putting the full filepath to the ZIP file.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jul 2024 13:50:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/add-item-nonetype-object-is-not-subscriptable/m-p/1502985#M71014</guid>
      <dc:creator>dgiersz_cuyahoga</dc:creator>
      <dc:date>2024-07-09T13:50:10Z</dc:date>
    </item>
  </channel>
</rss>

