<?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: Error Trapping in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/error-trapping/m-p/208692#M16145</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did you try the standardize address tool &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 20 Jul 2015 20:11:37 GMT</pubDate>
    <dc:creator>WesMiller</dc:creator>
    <dc:date>2015-07-20T20:11:37Z</dc:date>
    <item>
      <title>Error Trapping</title>
      <link>https://community.esri.com/t5/python-questions/error-trapping/m-p/208691#M16144</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I need to parse out address elements (house-num, pre-dir, street-name, suf-dir, street-type) from a single string field into individual fields. All my addresses &lt;EM&gt;&lt;STRONG&gt;should&lt;/STRONG&gt; &lt;/EM&gt;in the form of pre-dir, house-num, street-name, suf-dir or suf-type depending on the street name &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not a big deal, but my current script errors out with a 999999 error.&amp;nbsp; This tells me that somewhere down the line I have an address that does not follow the form above (hence &lt;EM&gt;&lt;STRONG&gt;should&lt;/STRONG&gt;&lt;/EM&gt;...)&amp;nbsp; At any rate is there a way to trap the error in such a fashion that I and make it an exception, or give me the record oid of the offending record?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Version 10.2.2 arcgis, appears to be Python 2.7.5 installed:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/118215_pastedImage_5.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/118216_pastedImage_6.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Jul 2015 20:06:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/error-trapping/m-p/208691#M16144</guid>
      <dc:creator>JoeBorgione</dc:creator>
      <dc:date>2015-07-20T20:06:12Z</dc:date>
    </item>
    <item>
      <title>Re: Error Trapping</title>
      <link>https://community.esri.com/t5/python-questions/error-trapping/m-p/208692#M16145</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did you try the standardize address tool &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Jul 2015 20:11:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/error-trapping/m-p/208692#M16145</guid>
      <dc:creator>WesMiller</dc:creator>
      <dc:date>2015-07-20T20:11:37Z</dc:date>
    </item>
    <item>
      <title>Re: Error Trapping</title>
      <link>https://community.esri.com/t5/python-questions/error-trapping/m-p/208693#M16146</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Joe,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can catch the error in a try-except block.&amp;nbsp; This should allow your script to run on the rest of your values, and you can put messages in the except block telling which features had the issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See &lt;A href="https://docs.python.org/2/tutorial/errors.html" title="https://docs.python.org/2/tutorial/errors.html"&gt;https://docs.python.org/2/tutorial/errors.html&lt;/A&gt; section 8.3&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Jul 2015 20:13:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/error-trapping/m-p/208693#M16146</guid>
      <dc:creator>IanMurray</dc:creator>
      <dc:date>2015-07-20T20:13:09Z</dc:date>
    </item>
    <item>
      <title>Re: Error Trapping</title>
      <link>https://community.esri.com/t5/python-questions/error-trapping/m-p/208694#M16147</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I more or less did it that on my own and found the offending records, fixed them and ran the script.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Jul 2015 20:29:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/error-trapping/m-p/208694#M16147</guid>
      <dc:creator>JoeBorgione</dc:creator>
      <dc:date>2015-07-20T20:29:23Z</dc:date>
    </item>
    <item>
      <title>Re: Error Trapping</title>
      <link>https://community.esri.com/t5/python-questions/error-trapping/m-p/208695#M16148</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'll give this a try.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Jul 2015 20:30:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/error-trapping/m-p/208695#M16148</guid>
      <dc:creator>JoeBorgione</dc:creator>
      <dc:date>2015-07-20T20:30:29Z</dc:date>
    </item>
  </channel>
</rss>

