AnsweredAssumed Answered

Python crashes after upgrade

Question asked by nexiga_bosbach on Dec 15, 2016
Latest reply on Dec 22, 2016 by rastrauch

Hi everyone,

 

we upgraded our ArcGIS Server from 10.2 to 10.4 and since then, python crashes when I'm using featureClassToFeatureClass method.

My Script worked with no problem on 10.2 but after upgrading to 10.4 python crashes.

I don't get an error massage, the python exe just stops working.

In the windows report I can see that the GdbCore.dll is causing the problem.

 

My script writes features from a SQL database to a gdb. But when it reaches the FeatureClassToFeatureClass_conversion method python completely crashes.  Below you can find a code example.

 

# Import modules
import sys
import os
import datetime
import shutil
import arcpy

 

# Local variables:
country = sys.argv[1]
exportPath = sys.argv[2]
dateString = datetime.datetime.now().date().strftime("%Y%m%d")
TEST_BASE_dbo_STOPPS = sys.argv[3] + "/TEST_BASE.dbo.View_STOPPS_EXPORT"

EXPORTED_DATA_gdb = exportPath + country + "_TOUREDITOR_" + dateString + ".gdb"

 

whereClause = "COUNTRY = '" + country + "'"

 

# delete old DataBase
if os.path.isdir(EXPORTED_DATA_gdb):
   shutil.rmtree(EXPORTED_DATA_gdb)

 

# create new DataBase
arcpy.CreateFileGDB_management(exportPath, country + "_TOUREDITOR_" + dateString + ".gdb")

 

# Process: Feature Class to Feature Class
print "Starting STOPPS Export..."
arcpy.FeatureClassToFeatureClass_conversion(TEST_BASE_dbo_STOPPS, EXPORTED_DATA_gdb, "STOPPS_" + dateString, whereClause)

 

Does anyone know how to fix this error?

 

kind regards

Sebastian

Outcomes