Quantcast
Channel: Forums - Python
Viewing all articles
Browse latest Browse all 2485

Joining a shapefiles attributes to a table in ArcGIS 10 using Python

$
0
0
Hi Experts,

I am trying to join a shapefiles attributes to a table in ArcGIS 10 using Python.
This is the code I have been using. What do the errors mean?? Why are error occuring?

>>> import arcpy
>>> from arcpy import env
>>> env.workspace = "R:\Dawson, Monique\Canada_Weather_Grid"

Parsing error <type 'exceptions.SyntaxError'>: invalid syntax (line 2)
>>> arcpy.JoinField_management("nodes_gp_100.csv", "ID", "Alberta_Weather_Nodes", "ID")
...
Runtime error <class 'arcgisscripting.ExecuteError'>: ERROR 000339: Input nodes_gp_100.csv does not have OIDs Failed to execute (JoinField).
>>> arcpy.JoinField_management("Alberta_Weather_Nodes", "ID", "nodes_gp_100.csv", "ID")
Runtime error <class 'arcgisscripting.ExecuteError'>: ERROR 999999: Error executing function. Failed to execute (JoinField).
>>> arcpy.JoinField_management("GP_100", "ID", "Alberta_Weather_Nodes", "ID")

Viewing all articles
Browse latest Browse all 2485

Trending Articles