<?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: Calulate Field in model Builder Script Not working in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/calulate-field-in-model-builder-script-not-working/m-p/12543#M1020</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I had to type the whole thing because the system I am working on is not on a network.&amp;nbsp; The tokens are the same mag_subset__2_&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 01 Dec 2011 18:16:39 GMT</pubDate>
    <dc:creator>WilliamIde</dc:creator>
    <dc:date>2011-12-01T18:16:39Z</dc:date>
    <item>
      <title>Calulate Field in model Builder Script Not working</title>
      <link>https://community.esri.com/t5/python-questions/calulate-field-in-model-builder-script-not-working/m-p/12539#M1016</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am have a created a model in Model builder to Calculate a date field from an existing field to a new field that I just created. The model works fine.&amp;nbsp; However now I would like to expand this functionality by growing the script.&amp;nbsp; Well right at the start I tried to run it un-modified from model builder.&amp;nbsp; No go.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I am running Arc 10.&amp;nbsp; All it includes is:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;import arcpy&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The error is 000732&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I notice that the imports are different from 9.3 to 10.&amp;nbsp; Any clue as to why this doesn't work?&amp;nbsp; Is Calculate field one of the tools that don't work in python?&amp;nbsp; I there a work around?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Urban&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Dec 2011 00:03:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/calulate-field-in-model-builder-script-not-working/m-p/12539#M1016</guid>
      <dc:creator>WilliamIde</dc:creator>
      <dc:date>2011-12-01T00:03:13Z</dc:date>
    </item>
    <item>
      <title>Re: Calulate Field in model Builder Script Not working</title>
      <link>https://community.esri.com/t5/python-questions/calulate-field-in-model-builder-script-not-working/m-p/12540#M1017</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I highly doubt you are getting a &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//00vp00000017000732.htm"&gt;732 error&lt;/A&gt;&lt;SPAN&gt; from simply importing arcpy, can you try posting the entire code in &lt;/SPAN&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;code tags?&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Dec 2011 13:12:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/calulate-field-in-model-builder-script-not-working/m-p/12540#M1017</guid>
      <dc:creator>MathewCoyle</dc:creator>
      <dc:date>2011-12-01T13:12:14Z</dc:date>
    </item>
    <item>
      <title>Re: Calulate Field in model Builder Script Not working</title>
      <link>https://community.esri.com/t5/python-questions/calulate-field-in-model-builder-script-not-working/m-p/12541#M1018</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;OK Here is the Script.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;#-______&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;#&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;# Mag_fieldcalc5.py&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;#&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;# Description&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;#---------&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;#import Arcpy&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;import arcpy&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;#local Variables&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;mag_subset__2_ = "fdmag_subset"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# Process: Calculate Field&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.CalculateField_management(mag_subset___,"RM_DATE_MODIFIED","[REPORT_DATE]", "PYTHON_9.3", "")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is the Error listing:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Trackeback ( most recent call last)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;File "D:\Projects\mag_fieldcalc5.py", Line 16 in &amp;lt;module&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.CalculateField_management(mag_subset___,"RM_DATE_MODIFIED","[REPORT_DATE]", "PYTHON_9.3", "")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;File "c:\Program Files (x86)\ArcGIS\Desktop10.0\arcpy\management.py", line 2727, in CalculateField&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; raise e&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ExecuteError: Failed to execute. Parameters are not valid.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ERROR 000732: Imput Table: Dataset mag_subset does not exist or is not supported&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Failed to execute (CalculateField)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Again this is how it was exported out of the Model Builder.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Usually I break things after I fool with them.&amp;nbsp; But, this is broken right out of the box.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Dec 2011 17:15:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/calulate-field-in-model-builder-script-not-working/m-p/12541#M1018</guid>
      <dc:creator>WilliamIde</dc:creator>
      <dc:date>2011-12-01T17:15:12Z</dc:date>
    </item>
    <item>
      <title>Re: Calulate Field in model Builder Script Not working</title>
      <link>https://community.esri.com/t5/python-questions/calulate-field-in-model-builder-script-not-working/m-p/12542#M1019</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;mag_subset__2_ != mag_subset___&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;That's most likely your main problem.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Exporting models to python rarely works as intended raw, it gives you a good framework on which to build.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Dec 2011 17:32:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/calulate-field-in-model-builder-script-not-working/m-p/12542#M1019</guid>
      <dc:creator>MathewCoyle</dc:creator>
      <dc:date>2011-12-01T17:32:55Z</dc:date>
    </item>
    <item>
      <title>Re: Calulate Field in model Builder Script Not working</title>
      <link>https://community.esri.com/t5/python-questions/calulate-field-in-model-builder-script-not-working/m-p/12543#M1020</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I had to type the whole thing because the system I am working on is not on a network.&amp;nbsp; The tokens are the same mag_subset__2_&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Dec 2011 18:16:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/calulate-field-in-model-builder-script-not-working/m-p/12543#M1020</guid>
      <dc:creator>WilliamIde</dc:creator>
      <dc:date>2011-12-01T18:16:39Z</dc:date>
    </item>
    <item>
      <title>Re: Calulate Field in model Builder Script Not working</title>
      <link>https://community.esri.com/t5/python-questions/calulate-field-in-model-builder-script-not-working/m-p/12544#M1021</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;It's hard to narrow down your error without the specific code you are using and error messages you are getting.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you are referencing an existing field, it should look like &lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;arcpy.CalculateField_management(mag_subset__2_,"RM_DATE_MODIFIED","!REPORT_DATE!","PYTHON_9.3","#")&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Dec 2011 19:06:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/calulate-field-in-model-builder-script-not-working/m-p/12544#M1021</guid>
      <dc:creator>MathewCoyle</dc:creator>
      <dc:date>2011-12-01T19:06:07Z</dc:date>
    </item>
    <item>
      <title>Re: Calulate Field in model Builder Script Not working</title>
      <link>https://community.esri.com/t5/python-questions/calulate-field-in-model-builder-script-not-working/m-p/12545#M1022</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Mine is almost exactly that except for the # at the end.&amp;nbsp; I posted&amp;nbsp; all of code and&amp;nbsp; error messages that I have.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Dec 2011 20:16:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/calulate-field-in-model-builder-script-not-working/m-p/12545#M1022</guid>
      <dc:creator>WilliamIde</dc:creator>
      <dc:date>2011-12-01T20:16:48Z</dc:date>
    </item>
    <item>
      <title>Re: Calulate Field in model Builder Script Not working</title>
      <link>https://community.esri.com/t5/python-questions/calulate-field-in-model-builder-script-not-working/m-p/12546#M1023</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Turns out I had multiple nit niods.&amp;nbsp; First.&amp;nbsp; env=\myproj\mygdb.gdb&amp;nbsp; Second I was using a personal gdb not a file gdb.&amp;nbsp; The locks and permissions are not quite the same.&amp;nbsp; Other than that it works a charm.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Dec 2011 15:07:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/calulate-field-in-model-builder-script-not-working/m-p/12546#M1023</guid>
      <dc:creator>WilliamIde</dc:creator>
      <dc:date>2011-12-12T15:07:40Z</dc:date>
    </item>
  </channel>
</rss>

