<?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 ArcMap 10/10.1 FeatureSet saving python tool causes complete crash in Transportation Questions</title>
    <link>https://community.esri.com/t5/transportation-questions/arcmap-10-10-1-featureset-saving-python-tool/m-p/254878#M820</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Recently I came across a situation when I tried to save an empty FeatureSet to a featureclass using the FeatureSet.save() method.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I realize that if the featureset object is not initialized or not populated saving process does not have to go correctly but completely crashing entire application is a bit too much I think. I would definitely expect any errors to be caught by the 'try-except' block.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In the attachment there is a set of files that should allow reproducing the behaviour. Unpack it to 'C:\Projects\bugtest'. Open 'C:\Projects\bugtest\tests.mxd'. In ArcMap go to 'Catalog' window and open 'Toolbox.tbx' from the home directory.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In the toolbox there are two python based tools. Both consume the same python script called 'rs2fc.py'. The difference between them is that:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;-fc2fc tool as input takes optional feature class parameter&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;-rs2fc tool as input takes optional feature set parameter&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Executing fc2fc without any input causes errors but the errors are caught by 'tr-except' block which is as expected&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Executing rs2fc without any input causes complete crash of ArcMap. No error is intercepted by 'tr-except' block.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In the attachments there are screen shots of the crash and data to reproduce it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Szymon&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 15 Nov 2012 09:31:32 GMT</pubDate>
    <dc:creator>SzymonPiskula</dc:creator>
    <dc:date>2012-11-15T09:31:32Z</dc:date>
    <item>
      <title>ArcMap 10/10.1 FeatureSet saving python tool causes complete crash</title>
      <link>https://community.esri.com/t5/transportation-questions/arcmap-10-10-1-featureset-saving-python-tool/m-p/254878#M820</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Recently I came across a situation when I tried to save an empty FeatureSet to a featureclass using the FeatureSet.save() method.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I realize that if the featureset object is not initialized or not populated saving process does not have to go correctly but completely crashing entire application is a bit too much I think. I would definitely expect any errors to be caught by the 'try-except' block.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In the attachment there is a set of files that should allow reproducing the behaviour. Unpack it to 'C:\Projects\bugtest'. Open 'C:\Projects\bugtest\tests.mxd'. In ArcMap go to 'Catalog' window and open 'Toolbox.tbx' from the home directory.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In the toolbox there are two python based tools. Both consume the same python script called 'rs2fc.py'. The difference between them is that:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;-fc2fc tool as input takes optional feature class parameter&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;-rs2fc tool as input takes optional feature set parameter&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Executing fc2fc without any input causes errors but the errors are caught by 'tr-except' block which is as expected&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Executing rs2fc without any input causes complete crash of ArcMap. No error is intercepted by 'tr-except' block.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In the attachments there are screen shots of the crash and data to reproduce it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Szymon&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Nov 2012 09:31:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/transportation-questions/arcmap-10-10-1-featureset-saving-python-tool/m-p/254878#M820</guid>
      <dc:creator>SzymonPiskula</dc:creator>
      <dc:date>2012-11-15T09:31:32Z</dc:date>
    </item>
    <item>
      <title>Re: ArcMap 10/10.1 FeatureSet saving python tool causes complete crash</title>
      <link>https://community.esri.com/t5/transportation-questions/arcmap-10-10-1-featureset-saving-python-tool/m-p/254879#M821</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Definitely should not crash.&amp;nbsp; Populating the parameter, as you noted, will help here, as will setting a schema for the parameter.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As an alternative to using .save could also just use CopyFeatures_management, which will fail for this case, but that can be then trapped for.&amp;nbsp;&amp;nbsp; Could also use GetParameterAsText (instead of GetParameter) to get the parameter's value.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;-Dave&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Nov 2012 20:59:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/transportation-questions/arcmap-10-10-1-featureset-saving-python-tool/m-p/254879#M821</guid>
      <dc:creator>DavidWynne</dc:creator>
      <dc:date>2012-11-15T20:59:31Z</dc:date>
    </item>
  </channel>
</rss>

