akireserrano86 / googletransitdatafeed

Automatically exported from code.google.com/p/googletransitdatafeed
0 stars 0 forks source link

Invalid latitude/longitude cause exception #285

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Include a latitude or longitude that is a string, not a number, in the feed.

What is the expected output? What do you see instead?
Some kind of error included in the output.

Instead, it causes a top level exception and the feedvalidator fails.
File "/usr/local/lib/python2.6/dist-packages/transitfeed/util.py", line 286, in 
ApproximateDistance
...
TypeError: a float is required

What version of the product are you using? On what operating system?
1.2.6, on linux

Please provide any additional information below.

Original issue reported on code.google.com by drinc...@google.com on 5 Apr 2011 at 12:28

GoogleCodeExporter commented 8 years ago
Another report. stack ends with

File "transitfeed\transfer.pyc", line 134, in ValidateTransferDistance
    self = <Transfer [('from_stop_id', u'39'), ('min_transfer_time', 0), ('to_stop_id', u'39'), ('transfer_type', 2)]>
    problems = <transitfeed.problems.ProblemReporter object at 0x01CA9690>

File "transitfeed\transfer.pyc", line 118, in GetTransferDistance
    to_stop = <Stop [('location_type', 0), ('stop_id', u'39'), ('stop_lat', None), ('stop_lon', None), ('stop_name', u'BELFORTE DI PRECI')]>
    self = <Transfer [('from_stop_id', u'39'), ('min_transfer_time', 0), ('to_stop_id', u'39'), ('transfer_type', 2)]>
    from_stop = <Stop [('location_type', 0), ('stop_id', u'39'), ('stop_lat', None), ('stop_lon', None), ('stop_name', u'BELFORTE DI PRECI')]>

File "transitfeed\util.pyc", line 443, in ApproximateDistanceBetweenStops
    stop1 = <Stop [('location_type', 0), ('stop_id', u'39'), ('stop_lat', None), ('stop_lon', None), ('stop_name', u'BELFORTE DI PRECI')]>
    stop2 = <Stop [('location_type', 0), ('stop_id', u'39'), ('stop_lat', None), ('stop_lon', None), ('stop_name', u'BELFORTE DI PRECI')]>

File "transitfeed\util.pyc", line 429, in ApproximateDistance
    degree_lng2 = None
    degree_lng1 = None
    degree_lat1 = None
    degree_lat2 = None

TypeError: a float is required

Original comment by tom.brow...@gmail.com on 15 Jul 2011 at 2:56

GoogleCodeExporter commented 8 years ago
Moved to https://github.com/google/transitfeed/issues/285

Original comment by bdfer...@google.com on 7 Oct 2014 at 7:35