<?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: Calculate Field issue from Python 2 to 3 in Data Management Questions</title>
    <link>https://community.esri.com/t5/data-management-questions/calculate-field-issue-from-python-2-to-3/m-p/1043912#M43203</link>
    <description>&lt;P&gt;check your data, it means that one of the splits doesn't yield what you expect.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You want the 2nd portion from the first split and the first from the second split.&lt;/P&gt;&lt;P&gt;If you have an entry the doesn't contain&amp;nbsp; "blah &amp;amp; Blah/done" with an " &amp;amp; "and a "/" then it will fail.&lt;/P&gt;&lt;P&gt;One possible problem is the extra spaces around the ampersand.&amp;nbsp; "&amp;amp;" is very different from " &amp;amp; "&lt;/P&gt;</description>
    <pubDate>Mon, 05 Apr 2021 18:28:28 GMT</pubDate>
    <dc:creator>DanPatterson</dc:creator>
    <dc:date>2021-04-05T18:28:28Z</dc:date>
    <item>
      <title>Calculate Field issue from Python 2 to 3</title>
      <link>https://community.esri.com/t5/data-management-questions/calculate-field-issue-from-python-2-to-3/m-p/1043900#M43202</link>
      <description>&lt;P&gt;In trying to upgrade code from Python 2 to 3, the below code broke for a calculate field that functioned in 2.x.&amp;nbsp; I tried putting double quotes around the (' &amp;amp; ') based on some searching, but did not do the trick.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;!FullName!.split(' &amp;amp; ')[1].split('/')[0]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The error is:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;ERROR 000539: 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;IndexError: list index out of range&lt;BR /&gt;Failed to execute (Calculate Field (4)).&lt;/P&gt;</description>
      <pubDate>Mon, 05 Apr 2021 18:02:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/calculate-field-issue-from-python-2-to-3/m-p/1043900#M43202</guid>
      <dc:creator>Brian_McLeer</dc:creator>
      <dc:date>2021-04-05T18:02:51Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Field issue from Python 2 to 3</title>
      <link>https://community.esri.com/t5/data-management-questions/calculate-field-issue-from-python-2-to-3/m-p/1043912#M43203</link>
      <description>&lt;P&gt;check your data, it means that one of the splits doesn't yield what you expect.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You want the 2nd portion from the first split and the first from the second split.&lt;/P&gt;&lt;P&gt;If you have an entry the doesn't contain&amp;nbsp; "blah &amp;amp; Blah/done" with an " &amp;amp; "and a "/" then it will fail.&lt;/P&gt;&lt;P&gt;One possible problem is the extra spaces around the ampersand.&amp;nbsp; "&amp;amp;" is very different from " &amp;amp; "&lt;/P&gt;</description>
      <pubDate>Mon, 05 Apr 2021 18:28:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/calculate-field-issue-from-python-2-to-3/m-p/1043912#M43203</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2021-04-05T18:28:28Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Field issue from Python 2 to 3</title>
      <link>https://community.esri.com/t5/data-management-questions/calculate-field-issue-from-python-2-to-3/m-p/1043915#M43204</link>
      <description>&lt;P&gt;Agree with Dan, this is a data issue and not python version related. It even have 2 spaces either side of the &amp;amp;, is that intended?&lt;/P&gt;</description>
      <pubDate>Mon, 05 Apr 2021 18:35:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/calculate-field-issue-from-python-2-to-3/m-p/1043915#M43204</guid>
      <dc:creator>DavidPike</dc:creator>
      <dc:date>2021-04-05T18:35:49Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Field issue from Python 2 to 3</title>
      <link>https://community.esri.com/t5/data-management-questions/calculate-field-issue-from-python-2-to-3/m-p/1043935#M43205</link>
      <description>&lt;P&gt;Here's another vote for a data issue; I won't even go into my usual tirade of special characters in free text fields.&amp;nbsp; You've already discovered one of the reasons I don't like them....&lt;/P&gt;</description>
      <pubDate>Mon, 05 Apr 2021 19:22:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/calculate-field-issue-from-python-2-to-3/m-p/1043935#M43205</guid>
      <dc:creator>JoeBorgione</dc:creator>
      <dc:date>2021-04-05T19:22:28Z</dc:date>
    </item>
  </channel>
</rss>

