<?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: I want to construct a replace statement in my python script in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/i-want-to-construct-a-replace-statement-in-my/m-p/461340#M36116</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You might try:&lt;/P&gt;&lt;PRE class="language-python line-numbers"&gt;&lt;CODE&gt;arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;CalculateField_management&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"Mainfb_Stage_P"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"AFileN"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"!ABFileN!.replace('/','-')"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"PYTHON_9.3"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 20 Sep 2017 16:13:26 GMT</pubDate>
    <dc:creator>RandyBurton</dc:creator>
    <dc:date>2017-09-20T16:13:26Z</dc:date>
    <item>
      <title>I want to construct a replace statement in my python script</title>
      <link>https://community.esri.com/t5/python-questions/i-want-to-construct-a-replace-statement-in-my/m-p/461339#M36115</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I want to construct a replace statement in my python script through the following python code below;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;arcpy.CalculateField_management("Mainfb_Stage_P","AFileN","!ABFileN!","PYTHON_9.3","replace(ABFileN, "/","-")") &amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But i keep getting the error below;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Runtime error &lt;BR /&gt;Traceback (most recent call last):&lt;BR /&gt; File "&amp;lt;string&amp;gt;", line 1, in &amp;lt;module&amp;gt;&lt;BR /&gt;TypeError: unsupported operand type(s) for /: 'str' and 'str'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyone with a wonderful suggestion. Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Sep 2017 14:36:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/i-want-to-construct-a-replace-statement-in-my/m-p/461339#M36115</guid>
      <dc:creator>OLANIYANOLAKUNLE</dc:creator>
      <dc:date>2017-09-20T14:36:26Z</dc:date>
    </item>
    <item>
      <title>Re: I want to construct a replace statement in my python script</title>
      <link>https://community.esri.com/t5/python-questions/i-want-to-construct-a-replace-statement-in-my/m-p/461340#M36116</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You might try:&lt;/P&gt;&lt;PRE class="language-python line-numbers"&gt;&lt;CODE&gt;arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;CalculateField_management&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"Mainfb_Stage_P"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"AFileN"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"!ABFileN!.replace('/','-')"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"PYTHON_9.3"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Sep 2017 16:13:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/i-want-to-construct-a-replace-statement-in-my/m-p/461340#M36116</guid>
      <dc:creator>RandyBurton</dc:creator>
      <dc:date>2017-09-20T16:13:26Z</dc:date>
    </item>
    <item>
      <title>Re: I want to construct a replace statement in my python script</title>
      <link>https://community.esri.com/t5/python-questions/i-want-to-construct-a-replace-statement-in-my/m-p/461341#M36117</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you RANDY!!!! You are the best.....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Sep 2017 18:25:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/i-want-to-construct-a-replace-statement-in-my/m-p/461341#M36117</guid>
      <dc:creator>OLANIYANOLAKUNLE</dc:creator>
      <dc:date>2017-09-20T18:25:26Z</dc:date>
    </item>
  </channel>
</rss>

