"Dataset xxx does not exist or is not supported" using Table to Domain in Python

المشرف العام

Administrator
طاقم الإدارة
"Dataset xxx does not exist or is not supported" using Table to Domain in Python

I have a directory of hundreds of *.csv files, containing code/description pairs for geodatabase domains. I'm trying to automate the creation of these domains using Python.

  1. If I manually run the Table to Domain tool using a *.csv file inArcToolbox, the domain is correctly created
  2. If I create a Model using the Table to Domain tool, hard-coding in the input file (andall other parameters) then export this to a Python script, thedomain is correctly created when I run the Python script
  3. If I try to iterate through all *.csv files in the directory, running the Tableto Domain tool for each file, I get the ""Dataset xxx does not existor is not supported" error message:
Failed to execute. Parameters are not valid.ERROR 000732: Input Table: Dataset C:\temp\01-01.csv does not exist or is not supported ERROR 000308: Invalid field type Failed to execute (TableToDomain).

I've placed a package here containing the template geodatabase, the working and broken python scripts, a few of the CSVs and the model which was used to export the working python script.

I suspect the problem is due to the path not being correct for the *.csv file, but I can't work out how to get it working. os.path.exists shows that the file does exist, so it may be an internal ArcGIS thing.

Note that the *.csv file does work correctly via ArcToolbox and the hard-coded Python script, so it's unlikely that the field type really is invalid.



أكثر...
 
أعلى