<?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 Issue with url declared in python in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/issue-with-url-declared-in-python/m-p/1602849#M94650</link>
    <description>&lt;P&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;I created a custom geoprocessing tool in Pro using a python script &amp;amp; tested it (of course) which works perfectly when I launch the script from ArcGIS&amp;nbsp;&lt;BR /&gt;I published this tool so I can use it using the REST API&lt;BR /&gt;&lt;BR /&gt;The issue I'm facing is when I launch the GP TOOL from the REST API the URL that I set in the script is switched to a path :&lt;/P&gt;&lt;LI-CODE lang="python"&gt;LAYER_URL = r"https://gisdata.xyzxy/arcgis/rest/services/ServiceA/FeatureServer/0"
arcpy.AddMessage(f"Layer URL: {LAYER_URL}")&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;This is what I get in the job Messages&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="HamzaMerini_0-1743783325347.png" style="width: 902px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/129506i16B9F033C4EDBAF9/image-dimensions/902x80?v=v2" width="902" height="80" role="button" title="HamzaMerini_0-1743783325347.png" alt="HamzaMerini_0-1743783325347.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;For some reason the URL is switched to a path and therefore I get an error when I want to access to the feature layer&lt;/P&gt;&lt;LI-CODE lang="python"&gt;feature_layer = FeatureLayer(featureLayerUrl, gis)&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;Do you know why is this happening ? And how can I force the script to keep the URL that I provided ?&lt;BR /&gt;&lt;BR /&gt;Thank You !&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 04 Apr 2025 16:19:35 GMT</pubDate>
    <dc:creator>HamzaMerini</dc:creator>
    <dc:date>2025-04-04T16:19:35Z</dc:date>
    <item>
      <title>Issue with url declared in python</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/issue-with-url-declared-in-python/m-p/1602849#M94650</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;I created a custom geoprocessing tool in Pro using a python script &amp;amp; tested it (of course) which works perfectly when I launch the script from ArcGIS&amp;nbsp;&lt;BR /&gt;I published this tool so I can use it using the REST API&lt;BR /&gt;&lt;BR /&gt;The issue I'm facing is when I launch the GP TOOL from the REST API the URL that I set in the script is switched to a path :&lt;/P&gt;&lt;LI-CODE lang="python"&gt;LAYER_URL = r"https://gisdata.xyzxy/arcgis/rest/services/ServiceA/FeatureServer/0"
arcpy.AddMessage(f"Layer URL: {LAYER_URL}")&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;This is what I get in the job Messages&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="HamzaMerini_0-1743783325347.png" style="width: 902px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/129506i16B9F033C4EDBAF9/image-dimensions/902x80?v=v2" width="902" height="80" role="button" title="HamzaMerini_0-1743783325347.png" alt="HamzaMerini_0-1743783325347.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;For some reason the URL is switched to a path and therefore I get an error when I want to access to the feature layer&lt;/P&gt;&lt;LI-CODE lang="python"&gt;feature_layer = FeatureLayer(featureLayerUrl, gis)&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;Do you know why is this happening ? And how can I force the script to keep the URL that I provided ?&lt;BR /&gt;&lt;BR /&gt;Thank You !&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Apr 2025 16:19:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/issue-with-url-declared-in-python/m-p/1602849#M94650</guid>
      <dc:creator>HamzaMerini</dc:creator>
      <dc:date>2025-04-04T16:19:35Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with url declared in python</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/issue-with-url-declared-in-python/m-p/1603105#M94678</link>
      <description>&lt;P&gt;Have you tried a FeatureSet?&lt;/P&gt;&lt;LI-CODE lang="python"&gt;feature_set = arcpy.FeatureSet()
feature_set.load("url.../FeatureServer/0")&lt;/LI-CODE&gt;</description>
      <pubDate>Sun, 06 Apr 2025 20:54:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/issue-with-url-declared-in-python/m-p/1603105#M94678</guid>
      <dc:creator>DavidPike</dc:creator>
      <dc:date>2025-04-06T20:54:11Z</dc:date>
    </item>
  </channel>
</rss>

