I'm using a simple script to run Integrate tool in a default gdb and feature class, where user can indicate the path where this gdb is located.
This script works well when path indicated by user don't have any white spaces, but gives an error when path contain spaces.
I know that I need to use path in a raw string format (r' '). But, how to do this since path is a parameter inputed by user?
import arcpy import os from os import path from arcpy import env from arcpy import da from arcpy import management # user input - GDB path gdb_dir = arcpy.GetParameterAsText(0) gdb = "Analysis.gdb" fdsND = "ND" network = "roads" fullnetwork = os.path.join(gdb_dir,gdb,fdsND,network) desc = arcpy.Describe(fullnetwork) SR = desc.spatialReference arcpy.Integrate_management (fullnetwork, "1.0 Meters")