<?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: CalculateField failing after upgrade to 10.1 and Win7 64bit in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/calculatefield-failing-after-upgrade-to-10-1-and/m-p/379269#M29914</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Unless you are running the python script with background processing (64-bit), python installed with ArcGIS v10.1 is only 32-bit.&amp;nbsp; You need to ensure you run this python script in 32-bit mode.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 08 Jan 2014 17:34:21 GMT</pubDate>
    <dc:creator>MichaelVolz</dc:creator>
    <dc:date>2014-01-08T17:34:21Z</dc:date>
    <item>
      <title>CalculateField failing after upgrade to 10.1 and Win7 64bit</title>
      <link>https://community.esri.com/t5/python-questions/calculatefield-failing-after-upgrade-to-10-1-and/m-p/379266#M29911</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi, I was previously using 10.0 on Win7 32-bit and have made the leap to 10.1 on Win7 64-bit.&amp;nbsp;&amp;nbsp;&amp;nbsp; For some reason a script that previously ran fine is now failing when it hits a CalculateField command.&amp;nbsp; The exact error message is:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;"ERROR 000989:&amp;nbsp; Tool CalculateField cannot use VB expressions for services"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;import arcpy # Local variables: Strata_TSA_VRI_bk = "E:\\Projects\\FMG_WTP_Overlays.gdb\\Strata_TSA_VRI_bk" Strata_TSA_VRI_bk_Layer = "Strata_TSA_VRI_bk_Layer" Strata_TSA_VRI_bk_Layer__3_ = "Strata_TSA_VRI_bk_Layer" # Process: Make Feature Layer arcpy.MakeFeatureLayer_management(Strata_TSA_VRI_bk, Strata_TSA_VRI_bk_Layer, "", "", "OBJECTID OBJECTID VISIBLE NONE;SHAPE SHAPE VISIBLE NONE;SISH_SEQ_NBR SISH_SEQ_NBR VISIBLE NONE;SISH_STRATUM_NAME SISH_STRATUM_NAME VISIBLE NONE;CROWN_CLOSURE CROWN_CLOSURE VISIBLE NONE;VRI_LIVE_STEMS_PER_HA VRI_LIVE_STEMS_PER_HA VISIBLE NONE;VRI_DEAD_STEMS_PER_HA VRI_DEAD_STEMS_PER_HA VISIBLE NONE;SPECIES_CD_1 SPECIES_CD_1 VISIBLE NONE;SPECIES_PCT_1 SPECIES_PCT_1 VISIBLE NONE;SPECIES_CD_2 SPECIES_CD_2 VISIBLE NONE;SPECIES_PCT_2 SPECIES_PCT_2 VISIBLE NONE;SPECIES_CD_3 SPECIES_CD_3 VISIBLE NONE;SPECIES_PCT_3 SPECIES_PCT_3 VISIBLE NONE;SPECIES_CD_4 SPECIES_CD_4 VISIBLE NONE;SPECIES_PCT_4 SPECIES_PCT_4 VISIBLE NONE;SPECIES_CD_5 SPECIES_CD_5 VISIBLE NONE;SPECIES_PCT_5 SPECIES_PCT_5 VISIBLE NONE;SPECIES_CD_6 SPECIES_CD_6 VISIBLE NONE;SPECIES_PCT_6 SPECIES_PCT_6 VISIBLE NONE;PROJ_AGE_1 PROJ_AGE_1 VISIBLE NONE;PROJ_HEIGHT_1 PROJ_HEIGHT_1 VISIBLE NONE;SHAPE_Length SHAPE_Length VISIBLE NONE;SHAPE_Area SHAPE_Area VISIBLE NONE") # Process: Select Layer By Attribute arcpy.SelectLayerByAttribute_management(Strata_TSA_VRI_bk_Layer, "NEW_SELECTION", "\"SPECIES_CD_1\" = 'FDI'") # Process: Calculate Field arcpy.CalculateField_management(Strata_TSA_VRI_bk_Layer__3_, "SPECIES_CD_1", "\"FD\"", "VB", "")&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Traceback (most recent call last):&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; File "E:\Projects\j4.py", line 22, in &amp;lt;module&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.CalculateField_management(Strata_TSA_VRI_bk_Layer__3_, "SPECIES_CD_1", "\"FD\"", "VB", "")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; File "C:\Program Files (x86)\ArcGIS\Desktop10.1\arcpy\arcpy\management.py", line 3129, 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: Failed to execute. Parameters are not valid.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ERROR 000989: Tool CalculateField cannot use VB expressions for services&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;IDLE environment:&amp;nbsp; Python 2.7.2 (default, Jun 12 2011, 14:24:46) [MSC v.1500 64 bit (AMD64)] on win32&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Did I miss something during my installation of ArcGIS 10.1?&amp;nbsp;&amp;nbsp; I have used VB syntax in all my scripts and I'd rather not change everything to Python syntax.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have also tested this CalculateField command in ModelBuilder.&amp;nbsp;&amp;nbsp; It executes sucessfully, just failing in the Python IDLE window.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Appreciate any suggestions.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Frank&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Jan 2014 16:38:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/calculatefield-failing-after-upgrade-to-10-1-and/m-p/379266#M29911</guid>
      <dc:creator>FrankOgiamien</dc:creator>
      <dc:date>2014-01-08T16:38:42Z</dc:date>
    </item>
    <item>
      <title>Re: CalculateField failing after upgrade to 10.1 and Win7 64bit</title>
      <link>https://community.esri.com/t5/python-questions/calculatefield-failing-after-upgrade-to-10-1-and/m-p/379267#M29912</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I don't think VB syntax is supported at v10.1.&amp;nbsp; I think you need to convert syntax to python.&amp;nbsp; There should be some Help on this in ESRI documentation and forums.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Jan 2014 17:01:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/calculatefield-failing-after-upgrade-to-10-1-and/m-p/379267#M29912</guid>
      <dc:creator>MichaelVolz</dc:creator>
      <dc:date>2014-01-08T17:01:27Z</dc:date>
    </item>
    <item>
      <title>Re: CalculateField failing after upgrade to 10.1 and Win7 64bit</title>
      <link>https://community.esri.com/t5/python-questions/calculatefield-failing-after-upgrade-to-10-1-and/m-p/379268#M29913</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Do you mean it's not supported within Python?&amp;nbsp;&amp;nbsp; Because in ArcGIS 10.1 if I bring up the Field Calculator there is a Parser box with a choice of VB Script and Python.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The Calculate Field tool in Model Builder also has a droplist for Expression Type and the default choice is VB, and it works fine.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I'd really hate to have to change all the CalculateField code in all my scripts...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;It must be something related specifically to Python.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My version of ArcGIS says&amp;nbsp; 10.1 SP1 for Desktop (Build 3143) if that helps.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Jan 2014 17:09:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/calculatefield-failing-after-upgrade-to-10-1-and/m-p/379268#M29913</guid>
      <dc:creator>FrankOgiamien</dc:creator>
      <dc:date>2014-01-08T17:09:22Z</dc:date>
    </item>
    <item>
      <title>Re: CalculateField failing after upgrade to 10.1 and Win7 64bit</title>
      <link>https://community.esri.com/t5/python-questions/calculatefield-failing-after-upgrade-to-10-1-and/m-p/379269#M29914</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Unless you are running the python script with background processing (64-bit), python installed with ArcGIS v10.1 is only 32-bit.&amp;nbsp; You need to ensure you run this python script in 32-bit mode.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Jan 2014 17:34:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/calculatefield-failing-after-upgrade-to-10-1-and/m-p/379269#M29914</guid>
      <dc:creator>MichaelVolz</dc:creator>
      <dc:date>2014-01-08T17:34:21Z</dc:date>
    </item>
    <item>
      <title>Re: CalculateField failing after upgrade to 10.1 and Win7 64bit</title>
      <link>https://community.esri.com/t5/python-questions/calculatefield-failing-after-upgrade-to-10-1-and/m-p/379270#M29915</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I follow you now.&amp;nbsp; Even though I have the 64bit background processing available, when I run the CalculateField in Modelbuilder with the "VB" syntax, it knows to use the 32bit python.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I modified the CalculateField code to Python syntax and it ran successfully in Idle 64bit.&amp;nbsp; If I am too lazy to modify my code in other scripts, then I must use 32bit python.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks very much,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Frank&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Jan 2014 17:59:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/calculatefield-failing-after-upgrade-to-10-1-and/m-p/379270#M29915</guid>
      <dc:creator>FrankOgiamien</dc:creator>
      <dc:date>2014-01-08T17:59:30Z</dc:date>
    </item>
    <item>
      <title>Re: CalculateField failing after upgrade to 10.1 and Win7 64bit</title>
      <link>https://community.esri.com/t5/python-questions/calculatefield-failing-after-upgrade-to-10-1-and/m-p/379271#M29916</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You summed it up better than my explanation.&amp;nbsp; I think that VB syntax is no longer valid in 64-bit mode, but you can still use it in 32-bit mode.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Jan 2014 18:08:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/calculatefield-failing-after-upgrade-to-10-1-and/m-p/379271#M29916</guid>
      <dc:creator>MichaelVolz</dc:creator>
      <dc:date>2014-01-08T18:08:42Z</dc:date>
    </item>
  </channel>
</rss>

