ericcharlton

Error with JoinField geoprocessing tool

Discussion created by ericcharlton on May 8, 2012
Latest reply on May 9, 2012 by ericcharlton
I'm getting the following error when I try to run a script in PythonWin for the Python Scripting for Geoprocessing Workflows ESRI Virtual Campus class for Arc GIS 10.0:

Traceback (most recent call last):
  File "C:\Python26\Lib\site-packages\pythonwin\pywin\framework\scriptutils.py", line 309, in RunScript
    debugger.run(codeObject, __main__.__dict__, start_stepping=0)
  File "C:\Python26\Lib\site-packages\pythonwin\pywin\debugger\__init__.py", line 60, in run
    _GetCurrentDebugger().run(cmd, globals,locals, start_stepping)
  File "C:\Python26\Lib\site-packages\pythonwin\pywin\debugger\debugger.py", line 624, in run
    exec cmd in globals, locals
  File "C:\Student\PythonGP10_0\Scripts\BufferRoads.py", line 16, in <module>
    arcpy.JoinField_management(inFeatures, inField, joinTable, joinField)
  File "C:\Program Files\ArcGIS\Desktop10.0\arcpy\arcpy\management.py", line 3667, in JoinField
    raise e
ExecuteError: Failed to execute. Parameters are not valid.
ERROR 000824: The tool is not licensed.
Failed to execute (JoinField).

I have also tried running the tool from the Python window in ArcMap with the same results. 
Here is the script:

import arcpy
from arcpy import env
#Set geoprocessing environment
arcpy.env.workspace = "C:/Student/PythonGP10_0/Data/SanJuan.gdb"
arcpy.env.overwriteOutput = True

#Set parameters used to join the BufferDistance table to the Roads feautre class

inFeatures = "Roads"
inField = "ROUTE_TYPE"
joinTable = "BufferDistance"
joinField = "ROUTE_TYPE"

#join table to feature class

arcpy.JoinField_management(inFeatures, inField, joinTable, joinField)

#Set parameters to buffer Roads feature class

outBuffers = "RoadBuffers"
buffField = "DISTANCE"

#Buffer roads based on DISTANCE attribute

arcpy.Buffer_management(inFeatures, outBuffers, buffField)

Any help on this would be greatly appreciated.

Outcomes