<?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: MakeQueryTable errors and very weird behaviour in Geoprocessing Questions</title>
    <link>https://community.esri.com/t5/geoprocessing-questions/makequerytable-errors-and-very-weird-behaviour/m-p/132522#M4566</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;So the None type is a Python thing, and how Null values are interpreted in a cursor statement. For example:&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;searchRows = arcpy.SearchCursor(myTableView)
for searchRow in searchRows:
&amp;nbsp;&amp;nbsp; if searchRow.getValue(myFieldName) == None:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print "Null Value!"
del searchRow, searchRows
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;Not sure what the added utility is exacltly, but there is also a new .isNull cursor method in v10.0&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;searchRows = arcpy.SearchCursor(myTableView)
for searchRow in searchRows:
&amp;nbsp;&amp;nbsp; if searchRow.isNull(myFieldName):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print "Null Value!"
del searchRow, searchRows&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;So is your error occuring in the MakeQueryTable part or the cursor part? More specifically, what line # is your code bombing on?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;test_query_table_for_client.py&lt;/SPAN&gt;&lt;SPAN&gt; seems to run all the way up to &lt;/SPAN&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;print "legal:" + legal&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;after that it bombs. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But as I mentioned before, if I run the other script first (&lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;test_query_table.py&lt;/SPAN&gt;&lt;SPAN&gt;), then re-run &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;test_query_table_for_client.py&lt;/SPAN&gt;&lt;SPAN&gt;, the script runs without error and returns the correct results.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 07:25:40 GMT</pubDate>
    <dc:creator>JoshuaChan</dc:creator>
    <dc:date>2021-12-11T07:25:40Z</dc:date>
    <item>
      <title>MakeQueryTable errors and very weird behaviour</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/makequerytable-errors-and-very-weird-behaviour/m-p/132515#M4559</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am trying to extract info out of two related tables. Someone suggested using MakeQueryTable and after fiddling around with syntax for a day it finally created a virtual table. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The values I need from it are LEGAL_NAME, FIRST_NAME, LAST_NAME - all are strings. If LEGAL_NAME is empty I want to use FIRST and LAST name concatenated. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Problem is it keeps bombing when LEGAL_NAME is null. I converted the value to string and in cases where first and last name are null the script doesn't mind that. But if LEGAL_NAME is null it bombs with the error message: &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;RuntimeError: ERROR 999999: Error executing function.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The index passed was not within the valid range.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I wrote another script to test things out. I did the MakeQueryTable with just one of the two tables. I manually (in SQLPlus) queried out the foreign key value of interest and plugged it into my test script and voila: the name fields print out fine.&amp;nbsp; Immediately after I ran my problem script WITHOUT MAKING ANY CHANGES and it now works as well. That makes no sense to me whatsoever as my test script doesn't perform any joins. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any clue what might be going on here? &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;How do I fix it so that it works without having to go thru each record and re-run the two scripts each time? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;test_query_table_for_client.py is my original script&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;test_query_table.py is my test one that magically fixes something to allow the first to work.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jan 2012 19:58:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/makequerytable-errors-and-very-weird-behaviour/m-p/132515#M4559</guid>
      <dc:creator>JoshuaChan</dc:creator>
      <dc:date>2012-01-05T19:58:01Z</dc:date>
    </item>
    <item>
      <title>Re: MakeQueryTable errors and very weird behaviour</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/makequerytable-errors-and-very-weird-behaviour/m-p/132516#M4560</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;a colleague and I did more testing and came to the conclusion that MakeQueryTable must be very buggy.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If the first of 3 fields is null it will "shift" the values up so that the 2nd value will now become the first value. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If I 'force' the values to become string via the str(&amp;lt;object&amp;gt;) it will call that null field "None" but it will still not be retreivable using "Getvalue" unless I run my 2nd script first. However that only happens if I run the first script immediately after the 2nd. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So - in an effort to avoid using voodoo sorcery and alchemy to make my script work I'll probably try something else like a whole series of MakeTableView statements.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jan 2012 14:32:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/makequerytable-errors-and-very-weird-behaviour/m-p/132516#M4560</guid>
      <dc:creator>JoshuaChan</dc:creator>
      <dc:date>2012-01-09T14:32:16Z</dc:date>
    </item>
    <item>
      <title>Re: MakeQueryTable errors and very weird behaviour</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/makequerytable-errors-and-very-weird-behaviour/m-p/132517#M4561</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: csny490&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="text-decoration:underline;"&gt;A typical ESRI analysis work flow:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1. Copy all data local (aka: Don't do anything over a network connection).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2. Clean up the data as to avoid anything that might make ESRI software throw a rod (getting rid of nulls in your case!)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;3. Do the analysis&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jan 2012 15:21:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/makequerytable-errors-and-very-weird-behaviour/m-p/132517#M4561</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2012-01-09T15:21:56Z</dc:date>
    </item>
    <item>
      <title>Re: MakeQueryTable errors and very weird behaviour</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/makequerytable-errors-and-very-weird-behaviour/m-p/132518#M4562</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;&lt;SPAN style="text-decoration:underline;"&gt;A typical ESRI analysis work flow:&lt;/SPAN&gt;&lt;BR /&gt;1. Copy all data local (aka: Don't do anything over a network connection).&lt;BR /&gt;2. Clean up the data as to avoid anything that might make ESRI software throw a rod (getting rid of nulls in your case!)&lt;BR /&gt;3. Do the analysis&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for the best practices.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;In this case I was hoping to avoid copying the data because the tables I need to use are 300K+ rows and 60K+ rows each.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;As for the nulls, if I was able to select them programatically then I wouldn't have this problem in the first place. So I'd have to either export it to a DBF and do this in Access (also not preferred) or some other manual process.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Because I'm writing this script so that any non-GIS user can run it I'm afraid this option is out.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jan 2012 16:52:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/makequerytable-errors-and-very-weird-behaviour/m-p/132518#M4562</guid>
      <dc:creator>JoshuaChan</dc:creator>
      <dc:date>2012-01-09T16:52:52Z</dc:date>
    </item>
    <item>
      <title>Re: MakeQueryTable errors and very weird behaviour</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/makequerytable-errors-and-very-weird-behaviour/m-p/132519#M4563</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: csny490&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;As for the nulls, if I was able to select them programatically then I wouldn't have this problem in the first place&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can't you specify this as part of the query???&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For example, something like:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;"PARCEL_ID = PARCEL_ID AND LEGAL_NAME IS NOT NULL"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Are you using this tool as a simply query or as part of a many-to-one or many-to-many sort of thing?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Typically I use this tool only for many-to-one relates. For example, if I have many records in a table each describing the height of the trees in a particular polygon over time, where:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;POLYGON_ID,DECADE,TREE_HEIGHT&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1,1,10&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1,2,15&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1,3,30&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1,4,60&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1,5,100&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1,6,110&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1,7,115&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1,8,120&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;and I want to return a polygon for each match record in the table.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jan 2012 17:12:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/makequerytable-errors-and-very-weird-behaviour/m-p/132519#M4563</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2012-01-09T17:12:31Z</dc:date>
    </item>
    <item>
      <title>Re: MakeQueryTable errors and very weird behaviour</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/makequerytable-errors-and-very-weird-behaviour/m-p/132520#M4564</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Can't you specify this as part of the query???&lt;BR /&gt;&lt;BR /&gt;For example, something like:&lt;BR /&gt;"PARCEL_ID = PARCEL_ID AND LEGAL_NAME IS NOT NULL"&lt;BR /&gt;&lt;BR /&gt;Are you using this tool as a simply query or as part of a many-to-one or many-to-many sort of thing?&lt;BR /&gt;&lt;BR /&gt;Typically I use this tool only for many-to-one relates. For example, if I have many records in a table each describing the height of the trees in a particular polygon over time, where:&lt;BR /&gt;&lt;BR /&gt;POLYGON_ID,DECADE,TREE_HEIGHT&lt;BR /&gt;1,1,10&lt;BR /&gt;1,2,15&lt;BR /&gt;1,3,30&lt;BR /&gt;1,4,60&lt;BR /&gt;1,5,100&lt;BR /&gt;1,6,110&lt;BR /&gt;1,7,115&lt;BR /&gt;1,8,120&lt;BR /&gt;&lt;BR /&gt;and I want to return a polygon for each match record in the table.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I guess the question is what does ArcGIS think a null text string is. Because I thought it was ok for "" or " " but when I got my error message it kept returning some blurb about a "None" datatype.&amp;nbsp; I also tried using the "IS NULL" evaluation - also same error.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;After converting this "None" datatype to string I was able to evaluate it as&amp;nbsp; stringname = "None" in my 2nd checking script but in my original script it didn't work. However it did work properly if I ran script #2 first. Why is that other than script 2 missing the table join part of the MakeQueryTable statement?&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When I check the field names in the join table they're all there. But I can't see any values even though the row counter gives me 1 row (as it should be)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jan 2012 17:52:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/makequerytable-errors-and-very-weird-behaviour/m-p/132520#M4564</guid>
      <dc:creator>JoshuaChan</dc:creator>
      <dc:date>2012-01-09T17:52:44Z</dc:date>
    </item>
    <item>
      <title>Re: MakeQueryTable errors and very weird behaviour</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/makequerytable-errors-and-very-weird-behaviour/m-p/132521#M4565</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: csny490&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So the None type is a Python thing, and how Null values are interpreted in a cursor statement. For example:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;searchRows = arcpy.SearchCursor(myTableView)
for searchRow in searchRows:
&amp;nbsp;&amp;nbsp; if searchRow.getValue(myFieldName) == None:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print "Null Value!"
del searchRow, searchRows
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Not sure what the added utility is exacltly, but there is also a new .isNull cursor method in v10.0&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;searchRows = arcpy.SearchCursor(myTableView)
for searchRow in searchRows:
&amp;nbsp;&amp;nbsp; if searchRow.isNull(myFieldName):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print "Null Value!"
del searchRow, searchRows&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So is your error occuring in the MakeQueryTable part or the cursor part? More specifically, what line # is your code bombing on?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 07:25:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/makequerytable-errors-and-very-weird-behaviour/m-p/132521#M4565</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-12-11T07:25:37Z</dc:date>
    </item>
    <item>
      <title>Re: MakeQueryTable errors and very weird behaviour</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/makequerytable-errors-and-very-weird-behaviour/m-p/132522#M4566</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;So the None type is a Python thing, and how Null values are interpreted in a cursor statement. For example:&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;searchRows = arcpy.SearchCursor(myTableView)
for searchRow in searchRows:
&amp;nbsp;&amp;nbsp; if searchRow.getValue(myFieldName) == None:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print "Null Value!"
del searchRow, searchRows
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;Not sure what the added utility is exacltly, but there is also a new .isNull cursor method in v10.0&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;searchRows = arcpy.SearchCursor(myTableView)
for searchRow in searchRows:
&amp;nbsp;&amp;nbsp; if searchRow.isNull(myFieldName):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print "Null Value!"
del searchRow, searchRows&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;So is your error occuring in the MakeQueryTable part or the cursor part? More specifically, what line # is your code bombing on?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;test_query_table_for_client.py&lt;/SPAN&gt;&lt;SPAN&gt; seems to run all the way up to &lt;/SPAN&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;print "legal:" + legal&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;after that it bombs. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But as I mentioned before, if I run the other script first (&lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;test_query_table.py&lt;/SPAN&gt;&lt;SPAN&gt;), then re-run &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;test_query_table_for_client.py&lt;/SPAN&gt;&lt;SPAN&gt;, the script runs without error and returns the correct results.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 07:25:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/makequerytable-errors-and-very-weird-behaviour/m-p/132522#M4566</guid>
      <dc:creator>JoshuaChan</dc:creator>
      <dc:date>2021-12-11T07:25:40Z</dc:date>
    </item>
    <item>
      <title>Re: MakeQueryTable errors and very weird behaviour</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/makequerytable-errors-and-very-weird-behaviour/m-p/132523#M4567</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: csny490&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hmm...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Try inserting this code after you make the query layer:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;nameDict = {}
errorDict = []
i = 0
searchRows = arcpy.SearchCursor("testtab")
for searchRow in searchRows:
&amp;nbsp;&amp;nbsp; i = i + 1
&amp;nbsp;&amp;nbsp; tlegal = row.WHSE_TANTALIS_TA_INTERESTED_PARTIES_LEGAL_NAME
&amp;nbsp;&amp;nbsp; tfirst = row.WHSE_TANTALIS_TA_INTERESTED_PARTIES_FIRST_NAME
&amp;nbsp;&amp;nbsp; tlast = row.WHSE_TANTALIS_TA_INTERESTED_PARTIES_LAST_NAME
&amp;nbsp;&amp;nbsp; if tlegal != None:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; nameDict&lt;I&gt; = str(tlegal)
&amp;nbsp;&amp;nbsp; elif tfirst != None and tlast != None:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; nameDict&lt;I&gt; = str(tfirst) + " " + str(tlast)
&amp;nbsp;&amp;nbsp; else:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print "Error in row #" + str(i)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; nameDict&lt;I&gt; = "FUBAR"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; errorDict&lt;I&gt; = [tlegal, tfirst, tlast]
del searchRow, searchRows
print errorDict&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you do get some FUBARS.... what row # are they occuring on? What are the legal, first, last variable values??? Print the contents of errorDict&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;One thing I notice is that you never delete your cursor objects in your code (see the last line of my code).... This is step is critical, since otherwise your cursor-based variables never re-initialize (even though you think they are). Also, be sure to restart your Python IDE evertime it errors until you get a feeling for how it works. When I first started doing Python stuff I did not do these two things, and it often led me to belive that Python/the gp object (now arcpy) was acting weird and inconsistently. It helps tremendously if you know you are starting from scratch everytime and your variables aren't using "ghost" values from previous runs.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 07:25:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/makequerytable-errors-and-very-weird-behaviour/m-p/132523#M4567</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-12-11T07:25:43Z</dc:date>
    </item>
  </channel>
</rss>

