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

Traffic Data

$
0
0
I have written a script to attempt to download traffic data but it has shown some errors i have tried to rectify but returning the error.

Here is my script:
# Olawumi Lanlehin
import arcpy
from arcpy import env
#Set local variables
trafficIncidentsStorage = "G:/London_Street/TrafficIncidentsStorage.mdb"
print "OK"
incidentsFeatureClass = "TomTom_Europe_Incidents"
print "OK"
provider = "TomTom Europe"
username = "APIKEY"
password = "lonche8"
#download data
regions = "#"
print "Good"
timeZoneBoundaries = "G/London_Street/TimeZones/euroTimeZones"
timeZonesID = "GMTIMEZONE"
print "On Track"
try:
#Updatte Traffic Data. Use default values for remaining parameters
arcpy.na.UpdateTrafficIncidents(provider,username,password,regions,trafficIncidentsStorage,incidentsFeatureClass,timeZoneBoundaries,timeZonesID)
except Exception as e:
#if an error occured, print line number and error message
import traceback, sys
tb = sys.exc_info()[2]
print "Error in line %i" % tb.tb_lineno
print str(e)

and here is the error message:

Error in line 20
Failed to execute. Parameters are not valid.
ERROR 000732: Time Zone Boundaries: Dataset G/London_Street/TimeZones/euroTimeZones does not exist or is not supported
ERROR 000308: Invalid field type
Failed to execute (UpdateTrafficIncidents).

Help!



Regards,


Ola

Viewing all articles
Browse latest Browse all 2485

Trending Articles