When opening a mxd with the command below it fails when the name has blank spaces. How can I fix that ?
mxdfile = os.path.join(path, file)
print(mxdfile + " is being processed")
mxd = arcpy.mapping.MapDocument(mxdfile)
when the path has a space? or the filename?
import osp = r"C:\Program Files (x86)\ArcGIS\Desktop10.6\arcpy"test = "somefile"os.path.join(p, test)'C:\\Program Files (x86)\\ArcGIS\\Desktop10.6\\arcpy\\somefile'test2 = "some file"os.path.join(p, test2)'C:\\Program Files (x86)\\ArcGIS\\Desktop10.6\\arcpy\\some file'
both work for me, so perhaps it is something in what or how you are providing the two.
Note the 'raw' formatting when specifying the folder name
After checking several times I found the error. The script can read mxd's names with spaces and process them.
what was your error?
Retrieving data ...