<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Python crashes after upgrade in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/python-crashes-after-upgrade/m-p/626072#M48807</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How are you running the script, foreground or background? Try running it in foreground.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 16 Dec 2016 12:54:58 GMT</pubDate>
    <dc:creator>DuncanHornby</dc:creator>
    <dc:date>2016-12-16T12:54:58Z</dc:date>
    <item>
      <title>Python crashes after upgrade</title>
      <link>https://community.esri.com/t5/python-questions/python-crashes-after-upgrade/m-p/626071#M48806</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;we upgraded our ArcGIS Server from 10.2 to 10.4 and since then, python crashes when I'm using featureClassToFeatureClass method.&lt;/P&gt;&lt;P&gt;My Script worked with no problem on 10.2 but after upgrading to 10.4 python crashes.&lt;/P&gt;&lt;P&gt;I don't get an error massage, the python exe just stops&amp;nbsp;working.&lt;/P&gt;&lt;P&gt;In the windows report I can see that the&amp;nbsp;GdbCore.dll is causing the problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My script writes features from a SQL database to a gdb. But when it reaches the&amp;nbsp;FeatureClassToFeatureClass_conversion method python completely crashes. &amp;nbsp;Below you can find a code example.&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;# Import modules&lt;BR /&gt;import sys&lt;BR /&gt;import os&lt;BR /&gt;import datetime&lt;BR /&gt;import shutil&lt;BR /&gt;import arcpy&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;# Local variables:&lt;BR /&gt;country = sys.argv[1]&lt;BR /&gt;exportPath = sys.argv[2]&lt;BR /&gt;dateString = datetime.datetime.now().date().strftime("%Y%m%d")&lt;BR /&gt;TEST_BASE_dbo_STOPPS = sys.argv[3] + "/TEST_BASE.dbo.View_STOPPS_EXPORT"&lt;/P&gt;&lt;P&gt;EXPORTED_DATA_gdb = exportPath + country + "_TOUREDITOR_" + dateString + ".gdb"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;whereClause = "COUNTRY = '" + country + "'"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;# delete old DataBase&lt;BR /&gt;if os.path.isdir(EXPORTED_DATA_gdb):&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;shutil.rmtree(EXPORTED_DATA_gdb)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;# create new DataBase&lt;BR /&gt;arcpy.CreateFileGDB_management(exportPath, country + "_TOUREDITOR_" + dateString + ".gdb")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;# Process: Feature Class to Feature Class&lt;BR /&gt;print "Starting STOPPS Export..."&lt;BR /&gt;&lt;STRONG&gt;arcpy.FeatureClassToFeatureClass_conversion(TEST_BASE_dbo_STOPPS, EXPORTED_DATA_gdb, "STOPPS_" + dateString, whereClause)&lt;/STRONG&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone know how to fix this error?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;kind regards&lt;/P&gt;&lt;P&gt;Sebastian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Dec 2016 14:08:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-crashes-after-upgrade/m-p/626071#M48806</guid>
      <dc:creator>SebastianBosbach</dc:creator>
      <dc:date>2016-12-15T14:08:39Z</dc:date>
    </item>
    <item>
      <title>Re: Python crashes after upgrade</title>
      <link>https://community.esri.com/t5/python-questions/python-crashes-after-upgrade/m-p/626072#M48807</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How are you running the script, foreground or background? Try running it in foreground.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Dec 2016 12:54:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-crashes-after-upgrade/m-p/626072#M48807</guid>
      <dc:creator>DuncanHornby</dc:creator>
      <dc:date>2016-12-16T12:54:58Z</dc:date>
    </item>
    <item>
      <title>Re: Python crashes after upgrade</title>
      <link>https://community.esri.com/t5/python-questions/python-crashes-after-upgrade/m-p/626073#M48808</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, it crashes even if I run it in foreground and with admin privileges.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PS: I forgot to mention that other scripts wich are not using "&lt;SPAN style="background-color: #ffffff;"&gt;FeatureClassToFeatureClass_conversion" are running fine.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Dec 2016 07:29:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-crashes-after-upgrade/m-p/626073#M48808</guid>
      <dc:creator>SebastianBosbach</dc:creator>
      <dc:date>2016-12-19T07:29:11Z</dc:date>
    </item>
    <item>
      <title>Re: Python crashes after upgrade</title>
      <link>https://community.esri.com/t5/python-questions/python-crashes-after-upgrade/m-p/626074#M48809</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;standalone python script? which IDE?&lt;/P&gt;&lt;P&gt;and that bug has been seen before with 10.4&amp;nbsp;&lt;/P&gt;&lt;P&gt;with no resolution nor mention in the changes... so contact tech support or keep upgrading to the newest and latest&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" class="link-titled" href="https://community.esri.com/message/620612?commentID=620612#comment-620612" title="https://community.esri.com/message/620612?commentID=620612#comment-620612"&gt;https://community.esri.com/message/620612?commentID=620612#comment-620612&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and hope the problem goes away&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Dec 2016 10:10:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-crashes-after-upgrade/m-p/626074#M48809</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2016-12-19T10:10:06Z</dc:date>
    </item>
    <item>
      <title>Re: Python crashes after upgrade</title>
      <link>https://community.esri.com/t5/python-questions/python-crashes-after-upgrade/m-p/626075#M48810</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your response, but as you can expect this was not the answer I was hoping for. &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/wink.png" /&gt;&lt;/P&gt;&lt;P&gt;What other way would you suggest to automatically copy features from a sql view to a gdb?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sebastian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Dec 2016 07:41:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-crashes-after-upgrade/m-p/626075#M48810</guid>
      <dc:creator>SebastianBosbach</dc:creator>
      <dc:date>2016-12-22T07:41:42Z</dc:date>
    </item>
    <item>
      <title>Re: Python crashes after upgrade</title>
      <link>https://community.esri.com/t5/python-questions/python-crashes-after-upgrade/m-p/626076#M48811</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a few more suggestions to try&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;although very old, &lt;A class="link-titled" href="https://blogs.esri.com/esri/arcgis/2008/09/05/digging-deeper-troubleshooting-geoprocessing-errors-when-using-arcsde-data/" title="https://blogs.esri.com/esri/arcgis/2008/09/05/digging-deeper-troubleshooting-geoprocessing-errors-when-using-arcsde-data/"&gt;Digging deeper – Troubleshooting geoprocessing errors when using ArcSDE data | ArcGIS Blog&lt;/A&gt;&amp;nbsp;&amp;nbsp; has some troubleshooting test, including connections etc.&lt;/LI&gt;&lt;LI&gt;there have been a few post in the past few weeks, mainly about upgrading because of 10.5, but worth testing to make sure you still have permissions &lt;A href="https://community.esri.com/thread/187578"&gt;SDE Upgrade to 10.5: error (-96)&lt;/A&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; never hurts to check permissions.&amp;nbsp; I also know that thru a few versions in the past, the software switched between needing the owner of the sde as part of the path, and not wanting it.&amp;nbsp; I had to change programs a couple times because of that.&amp;nbsp; But I'm still on 10.3 desktop, and SQL 2008 and SDE 10.2.2 or 10.3 and haven't had to modify my script for a while.&lt;/LI&gt;&lt;LI&gt;as typically is suggested, put in a few print or arcpy.AddMessage statements so you can make sure you variables are all still as expected.&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;usually when I use&lt;/LI&gt;&lt;/UL&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;arcpy.CreateFileGDB_management (outputPath, updateFGDBRoot)&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; I don't include the .gdb&amp;nbsp; in the out file name.&amp;nbsp; It should already know it will need a .gdb extension.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;have you run thru the process manually, using the ArcMap/Catalog python window, one line at a time (adding statements to print).&amp;nbsp; That might help you figure out where is it having the issue since you are not getting an error.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Personally, I would start with the last suggestion first if I was trying to debug things.&amp;nbsp; Hard to know what to fix if you don't have an error message (or find you are maybe returning zero records or some other non-error error).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Dec 2016 16:26:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-crashes-after-upgrade/m-p/626076#M48811</guid>
      <dc:creator>RebeccaStrauch__GISP</dc:creator>
      <dc:date>2016-12-22T16:26:31Z</dc:date>
    </item>
  </channel>
</rss>

