I am attempting to convert 5 fairly large CSV files into DBFs using ArcPy.
My code is below.
Currently when I run this script I am met with the following error:
ExecuteError: ERROR 999999: Error executing function. Failed to execute (TableToTable).
# Convert CSVs to DBase tables in preparation for join to FeatureClass dir_list = os.listdir(some dir) boro_list = ["Qn", "Mn", "Bk", "Bx", "Si"] dir_list = [x for x in dir_list if x.endswith("csv") and x[-6:-4] in boro_list] print(dir_list) arcpy.env.workspace = "some dir" for csv in dir_list: arcpy.TableToTable_conversion(csv, "some gdb", os.path.splitext(csv) + "_dbf") print("Successfully converted" + os.path.splitext(csv) + ".csv to " + os.path.splitext(csv) + ".dbf")
Printing dir_list prior to defining my env workspace yields a list of the 5 desired filenames for the CSVs. When done in ArcMap I am able to convert without problems using the manual version of the TableToTable_conversion tool.