Sadless74 / googletransitdatafeed

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

unsupported operand type when subset of shape rows have shape_dist_traveled #215

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
This sequence shows the problem. I haven't seen this in real data yet.

>>> s = transitfeed.Shape("myshapeid")
>>> s.AddPoint(2.000, 2.000, 0)
>>> s.AddPoint(2.001, 2.001, None)
>>> s.AddPoint(2.002, 2.002, None)
>>> s.AddPoint(2.003, 2.003, 1)
>>> s.GetPointWithDistanceTraveled(0.999)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "transitfeed/_transitfeed.py", line 2358, in 
GetPointWithDistanceTraveled
    bc = dist1 - shape_dist_traveled
TypeError: unsupported operand type(s) for -: 'NoneType' and 'float'

Original issue reported on code.google.com by tom.brow...@gmail.com on 29 Dec 2009 at 8:44

GoogleCodeExporter commented 9 years ago
Moved to https://github.com/google/transitfeed/issues/215

Original comment by bdfer...@google.com on 8 Oct 2014 at 12:10