kpg

Problem with import table

Discussion created by kpg on Dec 18, 2012
Latest reply on Dec 19, 2012 by Caleb1987
Hello,

I have a source geodatabase with three tables: Table_A, Table_B and Table_C.
I would like to export two of them to another geodatabase.
The list of tables I would like to export is written in txt files.

I've written a script in Python to do that but I have an error when I run it.


When the list contains only one table's name, the export is accomplished correctly.

Can You help mi with this script?

import arcpy

source="C:\\Data\\Data.gdb\\"
destination="C:\\Data\\Base.gdb"
Tables="C:\\Data\\Tables.txt"

w=open(Tables,'r')
lines=w.readlines()
for line in lines:
arcpy.TableToTable_conversion(source+line,destination,line)
w.close()


Error:
"arcgisscripting.ExecuteError: ERROR 999999: Error executing function.
The table was not found.
The table was not found. [Table_A]
Failed to execute (TableToTable)."

Outcomes