<?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 python Scripting Problem in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/python-scripting-problem/m-p/248835#M19217</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;When i run attached script. the following error message appear&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Traceback (most recent call last):&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; File "J:\Gampaha\Scripts\Script1.py", line 70, in &amp;lt;module&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.CalculateField_management(inTable, "Parcelid", int(Folder_Name)*10000 + int[TextString], "VB", "")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;NameError: name 'TextString' is not defined&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But [TextString] is the the field in inTable&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;i cant understand whats wrong with the script&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;pl give a help&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Padmasiri&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 29 Nov 2013 04:47:12 GMT</pubDate>
    <dc:creator>H_A_D_Padmasiri</dc:creator>
    <dc:date>2013-11-29T04:47:12Z</dc:date>
    <item>
      <title>python Scripting Problem</title>
      <link>https://community.esri.com/t5/python-questions/python-scripting-problem/m-p/248835#M19217</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;When i run attached script. the following error message appear&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Traceback (most recent call last):&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; File "J:\Gampaha\Scripts\Script1.py", line 70, in &amp;lt;module&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.CalculateField_management(inTable, "Parcelid", int(Folder_Name)*10000 + int[TextString], "VB", "")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;NameError: name 'TextString' is not defined&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But [TextString] is the the field in inTable&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;i cant understand whats wrong with the script&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;pl give a help&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Padmasiri&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Nov 2013 04:47:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-scripting-problem/m-p/248835#M19217</guid>
      <dc:creator>H_A_D_Padmasiri</dc:creator>
      <dc:date>2013-11-29T04:47:12Z</dc:date>
    </item>
    <item>
      <title>Re: python Scripting Problem</title>
      <link>https://community.esri.com/t5/python-questions/python-scripting-problem/m-p/248836#M19218</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Try this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
arcpy.CalculateField_management(inTable, "Parcelid", "int({0})*10000 + int([TextString])".format(Folder_Name), "VB", "")
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 12:22:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-scripting-problem/m-p/248836#M19218</guid>
      <dc:creator>FabianBlau</dc:creator>
      <dc:date>2021-12-11T12:22:47Z</dc:date>
    </item>
    <item>
      <title>Re: python Scripting Problem</title>
      <link>https://community.esri.com/t5/python-questions/python-scripting-problem/m-p/248837#M19219</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Dear Sir&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you very much for help me. I tried your code. unfortunately it gives me following error message.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Traceback (most recent call last):&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; File "J:\Gampaha\Scripts\Script1.py", line 72, in &amp;lt;module&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.CalculateField_management(inTable, "Parcelid", "(int({0})*10000 + int([TextString]))".format(Folder_Name), "VB", "")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; File "c:\program files\arcgis\desktop10.1\arcpy\arcpy\management.py", line 3128, in CalculateField&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; raise e&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ExecuteError: ERROR 999999: Error executing function.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Type mismatch: 'esri__8'&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Failed to execute (CalculateField).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;field Parcelid- data type is TEXT &amp;amp; length of 12&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;field Textstring- data type is TEXT &amp;amp; length of 255&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Is it course to above error?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I check the forum but any other not reply me to different solution.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When i run script ARCcatalog locked("May be locked by another application"). is it due to wrong syntax of my script?. Is there a method to remove that lock.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank You&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;hadpadmasiri&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Dec 2013 07:27:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-scripting-problem/m-p/248837#M19219</guid>
      <dc:creator>H_A_D_Padmasiri</dc:creator>
      <dc:date>2013-12-03T07:27:12Z</dc:date>
    </item>
    <item>
      <title>Re: python Scripting Problem</title>
      <link>https://community.esri.com/t5/python-questions/python-scripting-problem/m-p/248838#M19220</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Sorry, I did python not VB.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Change "VB" to "PYTHON_9.3" and [TextString] to !TextString!.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Dec 2013 07:44:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-scripting-problem/m-p/248838#M19220</guid>
      <dc:creator>FabianBlau</dc:creator>
      <dc:date>2013-12-12T07:44:45Z</dc:date>
    </item>
  </channel>
</rss>

