<?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 Downloading a feature whose name has a &amp;amp;amp;quot;/&amp;amp;amp;quot; in it in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/downloading-a-feature-whose-name-has-a-amp-amp/m-p/171688#M13200</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am trying to write a script that downloads a feature from HRSA's &lt;/SPAN&gt;&lt;A href="http://datawarehouse.hrsa.gov/HGDWFeatureService.aspx" rel="nofollow noopener noreferrer" target="_blank"&gt;geospatial warehouse&lt;/A&gt;&lt;SPAN&gt;, copies it to a geodatabase and then executes a bunch of other functions. I believe they are using ArcIMS.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have successfully done this for several files already, but when I try to download the file called "Medically Underserved Areas/Populations" I get an error and I KNOW it has to do with that stupid forward slash! How do I go around this? I have not been able to find a FQDN of where this service is actually located. When I pull this service into ArcMap and look at it's Name and Alias, they are both the same. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;A colleague recommended I put a backslash in front of the forward slash: &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;gt;&amp;gt;&amp;gt; MUA = "GIS Servers\\datawarehouse.hrsa.gov\\HGDW_Mapping\\Medically Underserved Areas\/Populations"
&amp;gt;&amp;gt;&amp;gt; print "(" + MUA + ")"
(GIS Servers\datawarehouse.hrsa.gov\HGDW_Mapping\Medically Underserved Areas\/Populations)
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Which obviously doesn't work. I tried recording it as a raw string:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;gt;&amp;gt;&amp;gt; MUA= r"GIS Servers\datawarehouse.hrsa.gov\HGDW_Mapping\Medically Underserved Areas/Populations"
&amp;gt;&amp;gt;&amp;gt; print "(" + MUA + ")"
(GIS Servers\datawarehouse.hrsa.gov\HGDW_Mapping\Medically Underserved Areas/Populations)&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Which at least gets the right pathname, but when I try to actually CopyFeatures, it still fails.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;gt;&amp;gt;&amp;gt; arcpy.CopyFeatures_management(MUA, "c:\\Default.gdb\\MUA_temp","","0","0","0")
Traceback (most recent call last):
&amp;nbsp; File "&amp;lt;stdin&amp;gt;", line 1, in &amp;lt;module&amp;gt;
&amp;nbsp; File "C:\Program Files (x86)\ArcGIS\Desktop10.0\arcpy\arcpy\management.py", line 1943, in CopyFeatures
&amp;nbsp;&amp;nbsp;&amp;nbsp; raise e
arcgisscripting.ExecuteError: Failed to execute. Parameters are not valid.
ERROR 000732: Input Features: Dataset GIS Servers\datawarehouse.hrsa.gov\HGDW_Mapping\Medically Underserved Areas/Populations does not exist or is not supported
 
Failed to execute (CopyFeatures).&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am really at a loss of where to go next. How can I tell python that "Medically Underserved Areas/Populations" is the actual name of the file it's looking for and to just ignore the "/"&amp;nbsp; - pretend like it's a space or something?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is super frustrating! Can anyone help? Is there ANY other way to get this file on my computer by a script or tool? I will eventually program this to happen automatically, so I really don't want to have to manually do this...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any help is greatly appreciated! Even if you just recommend giving up. At least then I can stop banging my head against the wall.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 08:53:27 GMT</pubDate>
    <dc:creator>SarahRichards</dc:creator>
    <dc:date>2021-12-11T08:53:27Z</dc:date>
    <item>
      <title>Downloading a feature whose name has a &amp;amp;quot;/&amp;amp;quot; in it</title>
      <link>https://community.esri.com/t5/python-questions/downloading-a-feature-whose-name-has-a-amp-amp/m-p/171688#M13200</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am trying to write a script that downloads a feature from HRSA's &lt;/SPAN&gt;&lt;A href="http://datawarehouse.hrsa.gov/HGDWFeatureService.aspx" rel="nofollow noopener noreferrer" target="_blank"&gt;geospatial warehouse&lt;/A&gt;&lt;SPAN&gt;, copies it to a geodatabase and then executes a bunch of other functions. I believe they are using ArcIMS.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have successfully done this for several files already, but when I try to download the file called "Medically Underserved Areas/Populations" I get an error and I KNOW it has to do with that stupid forward slash! How do I go around this? I have not been able to find a FQDN of where this service is actually located. When I pull this service into ArcMap and look at it's Name and Alias, they are both the same. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;A colleague recommended I put a backslash in front of the forward slash: &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;gt;&amp;gt;&amp;gt; MUA = "GIS Servers\\datawarehouse.hrsa.gov\\HGDW_Mapping\\Medically Underserved Areas\/Populations"
&amp;gt;&amp;gt;&amp;gt; print "(" + MUA + ")"
(GIS Servers\datawarehouse.hrsa.gov\HGDW_Mapping\Medically Underserved Areas\/Populations)
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Which obviously doesn't work. I tried recording it as a raw string:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;gt;&amp;gt;&amp;gt; MUA= r"GIS Servers\datawarehouse.hrsa.gov\HGDW_Mapping\Medically Underserved Areas/Populations"
&amp;gt;&amp;gt;&amp;gt; print "(" + MUA + ")"
(GIS Servers\datawarehouse.hrsa.gov\HGDW_Mapping\Medically Underserved Areas/Populations)&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Which at least gets the right pathname, but when I try to actually CopyFeatures, it still fails.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;gt;&amp;gt;&amp;gt; arcpy.CopyFeatures_management(MUA, "c:\\Default.gdb\\MUA_temp","","0","0","0")
Traceback (most recent call last):
&amp;nbsp; File "&amp;lt;stdin&amp;gt;", line 1, in &amp;lt;module&amp;gt;
&amp;nbsp; File "C:\Program Files (x86)\ArcGIS\Desktop10.0\arcpy\arcpy\management.py", line 1943, in CopyFeatures
&amp;nbsp;&amp;nbsp;&amp;nbsp; raise e
arcgisscripting.ExecuteError: Failed to execute. Parameters are not valid.
ERROR 000732: Input Features: Dataset GIS Servers\datawarehouse.hrsa.gov\HGDW_Mapping\Medically Underserved Areas/Populations does not exist or is not supported
 
Failed to execute (CopyFeatures).&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am really at a loss of where to go next. How can I tell python that "Medically Underserved Areas/Populations" is the actual name of the file it's looking for and to just ignore the "/"&amp;nbsp; - pretend like it's a space or something?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is super frustrating! Can anyone help? Is there ANY other way to get this file on my computer by a script or tool? I will eventually program this to happen automatically, so I really don't want to have to manually do this...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any help is greatly appreciated! Even if you just recommend giving up. At least then I can stop banging my head against the wall.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 08:53:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/downloading-a-feature-whose-name-has-a-amp-amp/m-p/171688#M13200</guid>
      <dc:creator>SarahRichards</dc:creator>
      <dc:date>2021-12-11T08:53:27Z</dc:date>
    </item>
    <item>
      <title>Re: Downloading a feature whose name has a "/" in it</title>
      <link>https://community.esri.com/t5/python-questions/downloading-a-feature-whose-name-has-a-amp-amp/m-p/171689#M13201</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Have you tried using regular expressions?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://docs.python.org/library/re.html"&gt;http://docs.python.org/library/re.html&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Feb 2012 00:42:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/downloading-a-feature-whose-name-has-a-amp-amp/m-p/171689#M13201</guid>
      <dc:creator>HenryColgate</dc:creator>
      <dc:date>2012-02-15T00:42:34Z</dc:date>
    </item>
    <item>
      <title>Re: Downloading a feature whose name has a "/" in it</title>
      <link>https://community.esri.com/t5/python-questions/downloading-a-feature-whose-name-has-a-amp-amp/m-p/171690#M13202</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://docs.python.org/library/re.html"&gt;http://docs.python.org/library/re.html&lt;/A&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for your suggestion. I have read through that page and even the "gentler" page and am still at a loss. Could you maybe give me an example of what regular expression to use? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm sorry, I know I'm dense! Your help is much appreciated!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Feb 2012 13:19:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/downloading-a-feature-whose-name-has-a-amp-amp/m-p/171690#M13202</guid>
      <dc:creator>SarahRichards</dc:creator>
      <dc:date>2012-02-16T13:19:14Z</dc:date>
    </item>
    <item>
      <title>Re: Downloading a feature whose name has a "/" in it</title>
      <link>https://community.esri.com/t5/python-questions/downloading-a-feature-whose-name-has-a-amp-amp/m-p/171691#M13203</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Probably led you down the garden path with RE.&amp;nbsp; Sorry about that.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have tried for a bit to solve the problem seeming as the data is openly available.&amp;nbsp; It seems to be really unrespsonsive to the point where I can't achieve it manually.&amp;nbsp; My gues is that if it can't be done manually it can't be done.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I even tried replicating the problem locally however I cannot create feature class names with a forward slash.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I would probably give it a miss or even contact the service provider and tell them about the problem.&amp;nbsp; They may even appreciate knowing their data is inaccessible.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Feb 2012 01:43:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/downloading-a-feature-whose-name-has-a-amp-amp/m-p/171691#M13203</guid>
      <dc:creator>HenryColgate</dc:creator>
      <dc:date>2012-02-24T01:43:43Z</dc:date>
    </item>
    <item>
      <title>Re: Downloading a feature whose name has a "/" in it</title>
      <link>https://community.esri.com/t5/python-questions/downloading-a-feature-whose-name-has-a-amp-amp/m-p/171692#M13204</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I think you can do this using string literals: &lt;/SPAN&gt;&lt;A href="http://docs.python.org/release/2.5.2/ref/strings.html" rel="nofollow noopener noreferrer" target="_blank"&gt;http://docs.python.org/release/2.5.2/ref/strings.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Somthing like:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;file = r"C:\temp\test\my cow is really a cow" + '/' + "horse"
&amp;gt;&amp;gt;&amp;gt; print file
'C:\\temp\\test\\my cow is really a cow/ horse'&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Windows won't let you name a file with a / or \, so I couldn't even test it...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Just an observation, but it is plain idiocy to name a file with a forward or backslash. As a "real user" of their data, you might have some good sway calling them up and complaining about their stupid file name...&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 08:53:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/downloading-a-feature-whose-name-has-a-amp-amp/m-p/171692#M13204</guid>
      <dc:creator>ChrisSnyder</dc:creator>
      <dc:date>2021-12-11T08:53:30Z</dc:date>
    </item>
  </channel>
</rss>

