<?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 when doing basic calculate field command: ArcGISPro in Ohio GIS Questions</title>
    <link>https://community.esri.com/t5/ohio-gis-questions/error-when-doing-basic-calculate-field-command/m-p/783179#M12</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello! By my best understanding the&amp;nbsp; division is not working because the field types are not the same. Somehow you need to get the population density from a string to a float.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't know of an elegant way to do this, you could brute force it by creating a new field make the type double and run a quick calculation so that the new field equals the values of "HD01_S001". After that is done you should be able to do your original calculation with the new field substituting for the population density field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope someone has a more finessed solution for you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 23 Apr 2018 11:16:50 GMT</pubDate>
    <dc:creator>TiffanyRufo</dc:creator>
    <dc:date>2018-04-23T11:16:50Z</dc:date>
    <item>
      <title>Error when doing basic calculate field command: ArcGISPro</title>
      <link>https://community.esri.com/t5/ohio-gis-questions/error-when-doing-basic-calculate-field-command/m-p/783178#M11</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I get this error when trying to calculate a field:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ERROR 000539: Error running expression: u"5359" / 5312094.0 &lt;BR /&gt;Traceback (most recent call last):&lt;BR /&gt; File "&amp;lt;expression&amp;gt;", line 1, in &amp;lt;module&amp;gt;&lt;BR /&gt;TypeError: unsupported operand type(s) for /: 'str' and 'float'&lt;BR /&gt;Failed to execute (CalculateField).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I downloaded census tracts for a county in Ohio, then I joined thiswith population data from American Fact Finder. After I export the data I joined, I add a new field "Pop Density"... To calculate this new field I need to divide Total population "HD01_S001" with the area of the Census tract "ALAND".. When I put this expression in the calculate field command I get the error above.. Don't understand what could be going wrong here...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Apr 2018 01:37:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/ohio-gis-questions/error-when-doing-basic-calculate-field-command/m-p/783178#M11</guid>
      <dc:creator>MasonGrant</dc:creator>
      <dc:date>2018-04-23T01:37:23Z</dc:date>
    </item>
    <item>
      <title>Re: Error when doing basic calculate field command: ArcGISPro</title>
      <link>https://community.esri.com/t5/ohio-gis-questions/error-when-doing-basic-calculate-field-command/m-p/783179#M12</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello! By my best understanding the&amp;nbsp; division is not working because the field types are not the same. Somehow you need to get the population density from a string to a float.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't know of an elegant way to do this, you could brute force it by creating a new field make the type double and run a quick calculation so that the new field equals the values of "HD01_S001". After that is done you should be able to do your original calculation with the new field substituting for the population density field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope someone has a more finessed solution for you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Apr 2018 11:16:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/ohio-gis-questions/error-when-doing-basic-calculate-field-command/m-p/783179#M12</guid>
      <dc:creator>TiffanyRufo</dc:creator>
      <dc:date>2018-04-23T11:16:50Z</dc:date>
    </item>
    <item>
      <title>Re: Error when doing basic calculate field command: ArcGISPro</title>
      <link>https://community.esri.com/t5/ohio-gis-questions/error-when-doing-basic-calculate-field-command/m-p/783180#M13</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For Python you should be able to&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;float(!HD01_S001!)/float(!&lt;SPAN&gt;ALAND!)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Apr 2018 11:45:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/ohio-gis-questions/error-when-doing-basic-calculate-field-command/m-p/783180#M13</guid>
      <dc:creator>BeckyGerlach</dc:creator>
      <dc:date>2018-04-23T11:45:46Z</dc:date>
    </item>
  </channel>
</rss>

