Hi,
I create a geoprocessing model that basically compare two features class and if it find a new record it write it to a feature class. we export this model to python script so this process could run every day at 6 pm automatically. when we run this model in model builder it works just find but when we run it after export it i got an error saying that some layers already exist but thats why we are overwriting the information.
this is the script and we added two lines to force it to overwrite
Attachment 19544
Attachment 19545
Attachment 19546
and when we run this process from Python this is the error
IDLE 2.6.5 ==== No Subprocess ====
>>>
Traceback (most recent call last):
File "C:\CrimeMapping\Replicacion\POLICIA\SyncComandanciaCarolina.py", line 86, in <module>
arcpy.gp.DetectarDiferenciasA(Incidencia_2012, IncidenciaSDE_A)
File "C:\Program Files (x86)\ArcGIS\Desktop10.0\arcpy\arcpy\geoprocessing\_base.py", line 474, in <lambda>
return lambda *args: val(*gp_fixargs(args))
ExecuteError: Failed to execute. Parameters are not valid.
WARNING 000258: Output C:\CrimeMapping\workspace\CAROLINAGIS.gdb\Equals already exists
WARNING 000258: Output C:\CrimeMapping\workspace\CAROLINAGIS.gdb\Diferencia_Incidentes already exists
WARNING 000258: Output C:\CrimeMapping\workspace\CAROLINAGIS.gdb\Incidentes_tmp already exists
WARNING 000970: The join field id_incidente in the join table Incidentes_tmp is not indexed. To improve performance, we recommend that an index be created for the join field in the join table.
WARNING 000258: Output C:\CrimeMapping\workspace\CAROLINAGIS.gdb\Nuevos_Incidentes already exists
ERROR 000655: An error was encountered while Validating Synchronize.
Failed to execute (DetectarDiferenciasA).
>>>
True
Traceback (most recent call last):
File "C:\CrimeMapping\Replicacion\POLICIA\SyncComandanciaCarolina.py", line 86, in <module>
arcpy.gp.DetectarDiferenciasA(Incidencia_2012, IncidenciaSDE_A)
File "C:\Program Files (x86)\ArcGIS\Desktop10.0\arcpy\arcpy\geoprocessing\_base.py", line 474, in <lambda>
return lambda *args: val(*gp_fixargs(args))
ExecuteError: Failed to execute. Parameters are not valid.
WARNING 000258: Output C:\CrimeMapping\workspace\CAROLINAGIS.gdb\Equals already exists
WARNING 000258: Output C:\CrimeMapping\workspace\CAROLINAGIS.gdb\Diferencia_Incidentes already exists
WARNING 000258: Output C:\CrimeMapping\workspace\CAROLINAGIS.gdb\Incidentes_tmp already exists
WARNING 000970: The join field id_incidente in the join table Incidentes_tmp is not indexed. To improve performance, we recommend that an index be created for the join field in the join table.
WARNING 000258: Output C:\CrimeMapping\workspace\CAROLINAGIS.gdb\Nuevos_Incidentes already exists
ERROR 000655: An error was encountered while Validating Synchronize.
Failed to execute (DetectarDiferenciasA).
As you can see we have a true, that means that the command line for overwrite is working
Does any one has any idea what could be happening? why is working find if I run the model but after exporting to python we got that error?
Regards,
Diego Llamas
I create a geoprocessing model that basically compare two features class and if it find a new record it write it to a feature class. we export this model to python script so this process could run every day at 6 pm automatically. when we run this model in model builder it works just find but when we run it after export it i got an error saying that some layers already exist but thats why we are overwriting the information.
this is the script and we added two lines to force it to overwrite
Attachment 19544
Attachment 19545
Attachment 19546
and when we run this process from Python this is the error
IDLE 2.6.5 ==== No Subprocess ====
>>>
Traceback (most recent call last):
File "C:\CrimeMapping\Replicacion\POLICIA\SyncComandanciaCarolina.py", line 86, in <module>
arcpy.gp.DetectarDiferenciasA(Incidencia_2012, IncidenciaSDE_A)
File "C:\Program Files (x86)\ArcGIS\Desktop10.0\arcpy\arcpy\geoprocessing\_base.py", line 474, in <lambda>
return lambda *args: val(*gp_fixargs(args))
ExecuteError: Failed to execute. Parameters are not valid.
WARNING 000258: Output C:\CrimeMapping\workspace\CAROLINAGIS.gdb\Equals already exists
WARNING 000258: Output C:\CrimeMapping\workspace\CAROLINAGIS.gdb\Diferencia_Incidentes already exists
WARNING 000258: Output C:\CrimeMapping\workspace\CAROLINAGIS.gdb\Incidentes_tmp already exists
WARNING 000970: The join field id_incidente in the join table Incidentes_tmp is not indexed. To improve performance, we recommend that an index be created for the join field in the join table.
WARNING 000258: Output C:\CrimeMapping\workspace\CAROLINAGIS.gdb\Nuevos_Incidentes already exists
ERROR 000655: An error was encountered while Validating Synchronize.
Failed to execute (DetectarDiferenciasA).
>>>
True
Traceback (most recent call last):
File "C:\CrimeMapping\Replicacion\POLICIA\SyncComandanciaCarolina.py", line 86, in <module>
arcpy.gp.DetectarDiferenciasA(Incidencia_2012, IncidenciaSDE_A)
File "C:\Program Files (x86)\ArcGIS\Desktop10.0\arcpy\arcpy\geoprocessing\_base.py", line 474, in <lambda>
return lambda *args: val(*gp_fixargs(args))
ExecuteError: Failed to execute. Parameters are not valid.
WARNING 000258: Output C:\CrimeMapping\workspace\CAROLINAGIS.gdb\Equals already exists
WARNING 000258: Output C:\CrimeMapping\workspace\CAROLINAGIS.gdb\Diferencia_Incidentes already exists
WARNING 000258: Output C:\CrimeMapping\workspace\CAROLINAGIS.gdb\Incidentes_tmp already exists
WARNING 000970: The join field id_incidente in the join table Incidentes_tmp is not indexed. To improve performance, we recommend that an index be created for the join field in the join table.
WARNING 000258: Output C:\CrimeMapping\workspace\CAROLINAGIS.gdb\Nuevos_Incidentes already exists
ERROR 000655: An error was encountered while Validating Synchronize.
Failed to execute (DetectarDiferenciasA).
As you can see we have a true, that means that the command line for overwrite is working
Does any one has any idea what could be happening? why is working find if I run the model but after exporting to python we got that error?
Regards,
Diego Llamas