<?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: Validate join gets ValueError: invalid literal for int() with base 10: '' in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/validate-join-gets-valueerror-invalid-literal-for/m-p/1349380#M69234</link>
    <description>&lt;P&gt;&lt;A href="https://community.esri.com/t5/python-blog/code-formatting-the-community-version/ba-p/1007633" target="_blank"&gt;Code formatting ... the Community Version - Esri Community&lt;/A&gt;&lt;/P&gt;&lt;P&gt;line numbers would help&lt;/P&gt;&lt;P&gt;after... val_res =&lt;/P&gt;&lt;P&gt;add ...&lt;/P&gt;&lt;P&gt;print(val_res)&lt;/P&gt;&lt;P&gt;It is apparently returning something that can't be converted to an integer&lt;/P&gt;</description>
    <pubDate>Tue, 14 Nov 2023 21:03:46 GMT</pubDate>
    <dc:creator>DanPatterson</dc:creator>
    <dc:date>2023-11-14T21:03:46Z</dc:date>
    <item>
      <title>Validate join gets ValueError: invalid literal for int() with base 10: ''</title>
      <link>https://community.esri.com/t5/python-questions/validate-join-gets-valueerror-invalid-literal-for/m-p/1349267#M69233</link>
      <description>&lt;P&gt;I pulled the validate join directly from esri but I keep getting the above error message when I run the script. When I try making the string into a float I get this error:&amp;nbsp;ValueError: could not convert string to float: ''&lt;/P&gt;&lt;DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;# Join the feature layer to a table&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;val_res&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;arcpy&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;ValidateJoin_management&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;inFeatures&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;joinField&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;joinTable&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;joinField&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;matched&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;int&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;val_res&lt;/SPAN&gt;&lt;SPAN&gt;[&lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;])&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;row_count&lt;/SPAN&gt;&lt;SPAN&gt; = int(val_res[&lt;/SPAN&gt;&lt;SPAN&gt;1&lt;/SPAN&gt;&lt;SPAN&gt;])&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;print&lt;/SPAN&gt;&lt;SPAN&gt;(arcpy.GetMessages()) &amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;# Tool messages about the Join&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;# Validate the join returns matched rows before proceeding&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;if&lt;/SPAN&gt;&lt;SPAN&gt; matched &amp;gt;= &lt;/SPAN&gt;&lt;SPAN&gt;1&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;joined&lt;/SPAN&gt;&lt;SPAN&gt; = arcpy.AddJoin_management(inFeatures, joinField, joinTable, joinField)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;# Copy the joined layer to a new permanent feature class&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; arcpy.CopyFeatures_management(joined, outFeature)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 14 Nov 2023 17:57:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/validate-join-gets-valueerror-invalid-literal-for/m-p/1349267#M69233</guid>
      <dc:creator>Ivy_Hinson</dc:creator>
      <dc:date>2023-11-14T17:57:01Z</dc:date>
    </item>
    <item>
      <title>Re: Validate join gets ValueError: invalid literal for int() with base 10: ''</title>
      <link>https://community.esri.com/t5/python-questions/validate-join-gets-valueerror-invalid-literal-for/m-p/1349380#M69234</link>
      <description>&lt;P&gt;&lt;A href="https://community.esri.com/t5/python-blog/code-formatting-the-community-version/ba-p/1007633" target="_blank"&gt;Code formatting ... the Community Version - Esri Community&lt;/A&gt;&lt;/P&gt;&lt;P&gt;line numbers would help&lt;/P&gt;&lt;P&gt;after... val_res =&lt;/P&gt;&lt;P&gt;add ...&lt;/P&gt;&lt;P&gt;print(val_res)&lt;/P&gt;&lt;P&gt;It is apparently returning something that can't be converted to an integer&lt;/P&gt;</description>
      <pubDate>Tue, 14 Nov 2023 21:03:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/validate-join-gets-valueerror-invalid-literal-for/m-p/1349380#M69234</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2023-11-14T21:03:46Z</dc:date>
    </item>
  </channel>
</rss>

