I am trying to write a script that downloads a feature from HRSA's geospatial warehouse, copies it to a geodatabase and then executes a bunch of other functions. I believe they are using ArcIMS.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. A colleague recommended I put a backslash in front of the forward slash: >>> MUA = "GIS Servers\\datawarehouse.hrsa.gov\\HGDW_Mapping\\Medically Underserved Areas\/Populations"
>>> print "(" + MUA + ")"
(GIS Servers\datawarehouse.hrsa.gov\HGDW_Mapping\Medically Underserved Areas\/Populations)
Which obviously doesn't work. I tried recording it as a raw string:>>> MUA= r"GIS Servers\datawarehouse.hrsa.gov\HGDW_Mapping\Medically Underserved Areas/Populations"
>>> print "(" + MUA + ")"
(GIS Servers\datawarehouse.hrsa.gov\HGDW_Mapping\Medically Underserved Areas/Populations)
Which at least gets the right pathname, but when I try to actually CopyFeatures, it still fails.>>> arcpy.CopyFeatures_management(MUA, "c:\\Default.gdb\\MUA_temp","","0","0","0")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Program Files (x86)\ArcGIS\Desktop10.0\arcpy\arcpy\management.py", line 1943, in CopyFeatures
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).
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 "/" - pretend like it's a space or something?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...Any help is greatly appreciated! Even if you just recommend giving up. At least then I can stop banging my head against the wall.