<?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: Error 00068: Broken data source, when trying to publish Web Tool with Portal connection. in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/error-00068-broken-data-source-when-trying-to/m-p/1029327#M5591</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Did you ever figure out the solution to this problem? I am receiving the same error; however, I do not use the arcgis api for python. Just arcpy, as I was having problems on my portal when importing the former. Like you, the tool runs just fine in ArcGIS Pro 2.5 but gets stuck on the Share As Web Tool phase.&lt;/P&gt;&lt;P&gt;Thanks for any help!&lt;/P&gt;</description>
    <pubDate>Mon, 22 Feb 2021 22:20:08 GMT</pubDate>
    <dc:creator>PhilipC</dc:creator>
    <dc:date>2021-02-22T22:20:08Z</dc:date>
    <item>
      <title>Error 00068: Broken data source, when trying to publish Web Tool with Portal connection.</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/error-00068-broken-data-source-when-trying-to/m-p/863113#M4264</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am running into an issue when trying to publish our Geoprocessing tool as a Web Tool to our portal.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I created the simplest script, to recreate the issue:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;from&lt;/SPAN&gt; arcgis&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;gis &lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; GIS
&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; arcpy

gis &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; GIS&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;url&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"https://gis.example.com/portal"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; username&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'geop'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; password&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'****'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

fv &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;GetParameterAsText&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; fv&lt;SPAN class="operator token"&gt;==&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;""&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
    fv &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'DEFAULT'&lt;/SPAN&gt;
fv &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; str&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fv&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;AddMessage&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"Parameter is: {}, type: {}"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;format&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fv&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; type&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fv&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;AddMessage&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"Finished!"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;‍‍‍‍‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It runs fine in ArcGIS Pro 2.5. When I try to share it as a Web Tool Error 00068 and Warning 24032 pop up, referencing a broken project data source.&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;Script TestScript contains broken project data source:&lt;/P&gt;&lt;P&gt;MESSAGEFORMAT=esriAGSInternetMessageFormatBin;SERVERTYPE=esriAGSServerTypeDiscovery;CONNECTIONMODE=esriAGSConnectionModePublisher;SERVERURL=&lt;A href="https://gis.example.com/arcgis;USERPORTALANDFEDSERVERTOKEN=-1;PORTALURL=https://gis.example.com/portal" target="_blank"&gt;https://gis.example.com/arcgis;USERPORTALANDFEDSERVERTOKEN=-1;PORTALURL=https://gis.example.com/portal&lt;/A&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I suppose that including ArcGIS API for Python like this in Web Tool is not desired/supported. What is the correct way to include it?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 10:42:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/error-00068-broken-data-source-when-trying-to/m-p/863113#M4264</guid>
      <dc:creator>MarkusBenninghoff</dc:creator>
      <dc:date>2021-12-12T10:42:34Z</dc:date>
    </item>
    <item>
      <title>Re: Error 00068: Broken data source, when trying to publish Web Tool with Portal connection.</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/error-00068-broken-data-source-when-trying-to/m-p/863114#M4265</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The same script runs fine with connection to ArcGIS Online. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="language-python line-numbers"&gt;&lt;CODE&gt;gis &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; GIS&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;url&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"https://www.arcgis.com"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; username&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'geop'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; password&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'****'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, we need to share it to our portal.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a way to register the Portal connection before publishing it as a Web Tool?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Related (unanswered) issue:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/thread/250333-can-the-python-api-be-used-in-a-web-tool-for-managing-portal-items"&gt;https://community.esri.com/thread/250333-can-the-python-api-be-used-in-a-web-tool-for-managing-portal-items&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Jun 2020 12:32:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/error-00068-broken-data-source-when-trying-to/m-p/863114#M4265</guid>
      <dc:creator>MarkusBenninghoff</dc:creator>
      <dc:date>2020-06-01T12:32:41Z</dc:date>
    </item>
    <item>
      <title>Re: Error 00068: Broken data source, when trying to publish Web Tool with Portal connection.</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/error-00068-broken-data-source-when-trying-to/m-p/1029327#M5591</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Did you ever figure out the solution to this problem? I am receiving the same error; however, I do not use the arcgis api for python. Just arcpy, as I was having problems on my portal when importing the former. Like you, the tool runs just fine in ArcGIS Pro 2.5 but gets stuck on the Share As Web Tool phase.&lt;/P&gt;&lt;P&gt;Thanks for any help!&lt;/P&gt;</description>
      <pubDate>Mon, 22 Feb 2021 22:20:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/error-00068-broken-data-source-when-trying-to/m-p/1029327#M5591</guid>
      <dc:creator>PhilipC</dc:creator>
      <dc:date>2021-02-22T22:20:08Z</dc:date>
    </item>
    <item>
      <title>Re: Error 00068: Broken data source, when trying to publish Web Tool with Portal connection.</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/error-00068-broken-data-source-when-trying-to/m-p/1029397#M5592</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/159477"&gt;@PhilipC&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/69266"&gt;@MarkusBenninghoff&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;This might help you with publishing the GP tool into Portal:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;portalURL = "https:??gis.example.com?portal"
portalURL = portalURL.replace('??', '//')
portalURL = portalURL.replace('?', '/')

gis = GIS(url = portalURL, username = 'geop', password = '****', verify_cert = False)&lt;/LI-CODE&gt;&lt;P&gt;When trying to share a GP tool and analyzing it before publishing, the GP script is scanned to discover any project data. When this happens, every quoted string used in a Python variable or as an argument to a function is tested to see if it is a path to data that exists.&lt;/P&gt;&lt;P&gt;Therefore, in the user's script,&amp;nbsp; the Portal URL string is interpreted as a file path, hence deemed to be an invalid data source. By creating a string variable as&amp;nbsp;"https:??gis.example.com?portal" and replacing the "?" with "/", the URL will be interpreted as a file path.&lt;/P&gt;&lt;P&gt;I hope that helps.&lt;/P&gt;&lt;P&gt;Mehdi&lt;/P&gt;</description>
      <pubDate>Tue, 23 Feb 2021 01:27:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/error-00068-broken-data-source-when-trying-to/m-p/1029397#M5592</guid>
      <dc:creator>MehdiPira1</dc:creator>
      <dc:date>2021-02-23T01:27:41Z</dc:date>
    </item>
    <item>
      <title>Re: Error 00068: Broken data source, when trying to publish Web Tool with Portal connection.</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/error-00068-broken-data-source-when-trying-to/m-p/1029567#M5593</link>
      <description>&lt;P&gt;Thank you &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/43250"&gt;@MehdiPira1&lt;/a&gt;&amp;nbsp;! This worked for me!&lt;/P&gt;</description>
      <pubDate>Tue, 23 Feb 2021 14:59:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/error-00068-broken-data-source-when-trying-to/m-p/1029567#M5593</guid>
      <dc:creator>PhilipC</dc:creator>
      <dc:date>2021-02-23T14:59:18Z</dc:date>
    </item>
    <item>
      <title>Re: Error 00068: Broken data source, when trying to publish Web Tool with Portal connection.</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/error-00068-broken-data-source-when-trying-to/m-p/1029849#M5600</link>
      <description>&lt;P&gt;Cool &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/159477"&gt;@PhilipC&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Great to hear that!&lt;/P&gt;</description>
      <pubDate>Wed, 24 Feb 2021 00:39:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/error-00068-broken-data-source-when-trying-to/m-p/1029849#M5600</guid>
      <dc:creator>MehdiPira1</dc:creator>
      <dc:date>2021-02-24T00:39:00Z</dc:date>
    </item>
    <item>
      <title>Re: Error 00068: Broken data source, when trying to publish Web Tool with Portal connection.</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/error-00068-broken-data-source-when-trying-to/m-p/1149377#M7193</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/43250"&gt;@MehdiPira1&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Thank-you for the work around on the Portal URL. I've changed this in the script tool I'm trying to share as a web tool. I still have errors with the web tool analyze step in that it wants to register/copy all the AGOL feature layer urls to the server. This is the first web tool I am trying to share to our Portal and currently we do not have a collaboration set up with our organization AGOL. Can I register our AGOL as a data store for these services?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Or is there an issue with AGOL feature layers (only shared to a group) being used as data sources in web tools? The GIS object I reference in the script is to our AGOL not our Portal since the data is in AGOL. I am new to the web tool and so I'm still not sure on all the settings.&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;Kathy&lt;/P&gt;</description>
      <pubDate>Wed, 02 Mar 2022 00:15:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/error-00068-broken-data-source-when-trying-to/m-p/1149377#M7193</guid>
      <dc:creator>kmsmikrud</dc:creator>
      <dc:date>2022-03-02T00:15:38Z</dc:date>
    </item>
    <item>
      <title>Re: Error 00068: Broken data source, when trying to publish Web Tool with Portal connection.</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/error-00068-broken-data-source-when-trying-to/m-p/1242630#M8186</link>
      <description>&lt;P&gt;&lt;A href="https://support.esri.com/en/technical-article/000022882" target="_blank" rel="noopener"&gt;https://support.esri.com/en/technical-article/000022882&lt;/A&gt;&lt;/P&gt;&lt;PRE&gt;portalURL = "https??hostname.domian.com?portal"
portalURL = portalURL.replace('??', '&lt;STRONG&gt;:&lt;/STRONG&gt;//')
portalURL = portalURL.replace('?', '/')
gis = GIS(portalURL)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;Attention: '&lt;STRONG&gt;??&lt;/STRONG&gt;' need to be replaced with '&lt;STRONG&gt;://&lt;/STRONG&gt;'&lt;/P&gt;</description>
      <pubDate>Tue, 20 Dec 2022 11:25:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/error-00068-broken-data-source-when-trying-to/m-p/1242630#M8186</guid>
      <dc:creator>Ranga_Tolapi</dc:creator>
      <dc:date>2022-12-20T11:25:05Z</dc:date>
    </item>
  </channel>
</rss>

