Select to view content in your preferred language

Traffic Data

742
1
03-30-2013 03:10 AM
OlawumiLanlehin
Emerging Contributor
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
Tags (2)
0 Kudos
1 Reply
curtvprice
MVP Alum
I think this path is incorrect:


timeZoneBoundaries = "G/London_Street/TimeZones/euroTimeZones"

should be

timeZoneBoundaries = "G:/London_Street/TimeZones/euroTimeZones"


[thread=48475]How to post Python code[/thread]
0 Kudos