google / transitfeed

A Python library for reading, validating, and writing transit schedule information in the GTFS format.
https://github.com/google/transitfeed/wiki
Apache License 2.0
680 stars 253 forks source link

Feed Validator Stopped Functioning #449

Open kuonwheels opened 6 years ago

kuonwheels commented 6 years ago

transitfeedcrash.txt UPDATE: I ran this again this morning, and did get the transit feed crash report. It is now attached here.

Yesterday, I downloaded the most recent feed validator, and began the process of running validations. When I got back to it this morning, I got one good validation, and then the validator stopped working altogether.

I am now getting a lot of lines of code/feeddback that start with "Yikes, this program threw an unexpected exception!" -- and the system is NOT generating a crash log.

I tried reinstalling the validator, and I have re-generated my .txt comma delimited files several times. Help?!

TomGoBravo commented 6 years ago
File "c:\transitfeed-1.2.16\transitfeed\transfer.py", line 162, in ValidateTransferWalkingTime
         FAST_WALKING_SPEED= 2 # 2m/s
 -->     if self.min_transfer_time + 120 < distance / FAST_WALKING_SPEED:
           problems.TransferWalkingSpeedTooFast(from_stop_id=self.from_stop_id,
    distance = None
    problems = <transitfeed.problems.ProblemReporter object at 0x0537B3B0>
    FAST_WALKING_SPEED = 2
    self = <Transfer [('from_stop_id', u'7TH_VERMONT'), ('min_transfer_time', 0), ('to_stop_id', u'7TH_VERMONT'), ('transfer_type', 2)]>

TypeError: unsupported operand type(s) for /: 'NoneType' and 'int'

I don't know why distance 7TH_VERMONT to 7TH_VERMONT returns None instead of 0. I'm guessing it doesn't have a valid lat or lng. Try running with --output=CONSOLE documented on https://github.com/google/transitfeed/wiki/FeedValidator to get a warning about that.

hbruch commented 5 years ago

Just ran into the same issue which stopped the validation. One of both transfer stops indeed had no lat/lon specified.

As no lat/lon issues are already logged as an error, the ValidateTransferWalkingTime check IMO should silently skip, if distance is undefined.