<?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: I am trying to upload a File geodatabase, but cannot publish in Portal 10.4.1 in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/i-am-trying-to-upload-a-file-geodatabase-but/m-p/346696#M27176</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try using the type as "ZIP" or ".ZIP".&lt;/P&gt;&lt;P&gt;If that doesn't work, try doing the steps manually as mentioned in the following link "Publish the contents of a File Geodatabase".&lt;/P&gt;&lt;P&gt;&lt;A href="https://doc.arcgis.com/en/arcgis-online/share-maps/publish-features.htm"&gt;https://doc.arcgis.com/en/arcgis-online/share-maps/publish-features.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Note: You can publish the following data types from an FGDB to a hosted feature layer&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; i) Feature Classes (X and Y coordinates; M and Z coordinates will be dropped, if any)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ii) Tables&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; iii) Attachments&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; iv) Relationship Classes&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 03 Aug 2016 15:55:50 GMT</pubDate>
    <dc:creator>JayantaPoddar</dc:creator>
    <dc:date>2016-08-03T15:55:50Z</dc:date>
    <item>
      <title>I am trying to upload a File geodatabase, but cannot publish in Portal 10.4.1</title>
      <link>https://community.esri.com/t5/python-questions/i-am-trying-to-upload-a-file-geodatabase-but/m-p/346695#M27175</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am uploading a File geodatabase using the new &lt;SPAN style="font-family: 'Courier New'; font-size: 11pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN-AU; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;arcgis.gis &lt;/SPAN&gt;API. Because my Portal is 10.4.1, I should be able to publish the contents of the file geodatabase as feature services. I can upload and publish a shape file, but with similar code, uploading a file geodatabase works, but publishing fails.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the code for the uploading the file geodatabase:&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New';"&gt;from arcgis.gis import *&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New';"&gt;gis = GIS("&lt;A href="http://&amp;lt;myportalserver&amp;gt;/arcgis"&gt;http://&amp;lt;myportalserver&amp;gt;/arcgis&lt;/A&gt;","&amp;lt;username", "&amp;lt;password&amp;gt;")&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New';"&gt;data = "C:\\temp\\fgdbtest.zip" # File geodatabase zipped up&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New';"&gt;item_properties = {} &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New';"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New';"&gt;item_properties ["type"] = "fileGeodatabase"&amp;nbsp; # I need the type definition, otherwise add did not work&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New';"&gt;fgdbdata = gis.content.add(item_properties, data)# this works, the item is uploaded&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New';"&gt;fgdbdata.publish() # ERROR: &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; font-size: 10pt;"&gt;I get an error that Nonetype has no attribute publish(), so obviously fgdbdata is empty or None. Yet almost the same code does work when uploading a shape file. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; font-size: 10pt;"&gt;Does anyone have an example where a File geodatabase is uploaded as a new item and then the feature classes within published as feature services? &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; font-size: 10pt;"&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; font-size: 10pt;"&gt;Hugo&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Aug 2016 09:59:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/i-am-trying-to-upload-a-file-geodatabase-but/m-p/346695#M27175</guid>
      <dc:creator>HugoBouckaert</dc:creator>
      <dc:date>2016-08-03T09:59:52Z</dc:date>
    </item>
    <item>
      <title>Re: I am trying to upload a File geodatabase, but cannot publish in Portal 10.4.1</title>
      <link>https://community.esri.com/t5/python-questions/i-am-trying-to-upload-a-file-geodatabase-but/m-p/346696#M27176</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try using the type as "ZIP" or ".ZIP".&lt;/P&gt;&lt;P&gt;If that doesn't work, try doing the steps manually as mentioned in the following link "Publish the contents of a File Geodatabase".&lt;/P&gt;&lt;P&gt;&lt;A href="https://doc.arcgis.com/en/arcgis-online/share-maps/publish-features.htm"&gt;https://doc.arcgis.com/en/arcgis-online/share-maps/publish-features.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Note: You can publish the following data types from an FGDB to a hosted feature layer&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; i) Feature Classes (X and Y coordinates; M and Z coordinates will be dropped, if any)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ii) Tables&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; iii) Attachments&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; iv) Relationship Classes&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Aug 2016 15:55:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/i-am-trying-to-upload-a-file-geodatabase-but/m-p/346696#M27176</guid>
      <dc:creator>JayantaPoddar</dc:creator>
      <dc:date>2016-08-03T15:55:50Z</dc:date>
    </item>
    <item>
      <title>Re: I am trying to upload a File geodatabase, but cannot publish in Portal 10.4.1</title>
      <link>https://community.esri.com/t5/python-questions/i-am-trying-to-upload-a-file-geodatabase-but/m-p/346697#M27177</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Set the type as 'File Geodatabase', not 'fileGeodatabase':&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;item_properties = {}&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;item_properties['type'] = "File Geodatabase"&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When publishing the item, specify a name without periods and spaces, eg:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;fgdbdata.publish({'name' : 't3_Name_of_service'})&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Aug 2016 07:51:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/i-am-trying-to-upload-a-file-geodatabase-but/m-p/346697#M27177</guid>
      <dc:creator>RohitSingh2</dc:creator>
      <dc:date>2016-08-04T07:51:58Z</dc:date>
    </item>
    <item>
      <title>Re: I am trying to upload a File geodatabase, but cannot publish in Portal 10.4.1</title>
      <link>https://community.esri.com/t5/python-questions/i-am-trying-to-upload-a-file-geodatabase-but/m-p/346698#M27178</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a million, you saved my bacon, it works!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I spent hours on this so your reply is greatly appreciated!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hugo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Aug 2016 08:16:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/i-am-trying-to-upload-a-file-geodatabase-but/m-p/346698#M27178</guid>
      <dc:creator>HugoBouckaert</dc:creator>
      <dc:date>2016-08-04T08:16:11Z</dc:date>
    </item>
  </channel>
</rss>

