akireserrano86 / googletransitdatafeed

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

Validator throws unexpected exception #218

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

Feed Validator 1.2.5 crashes when validating MBTA schedule data.  1.2.1 
completes the evaluation successfully.  The data currently provided from 
the MBTA to Google should reproduce this error.  

What is the expected output? What do you see instead?

Program crashes.

What version of the product are you using? On what operating system?

transitfeed windows binary version 1.2.5.  Running on Windows XP (tablet pc 
edition) service pack 3.

Please provide any additional information below.

The files that produce this error are the same that are being provided to 
Google and validate successfully (with errors) in 1.2.1.

Transitfeedcrash.txt is attached (the file has been renamed but is 
otherwise unchanged.)

Original issue reported on code.google.com by dbarkerm...@gmail.com on 14 Jan 2010 at 10:32

Attachments:

GoogleCodeExporter commented 8 years ago
File "transitfeed\_transitfeed.pyc", line 3263, in AddTransferObject
    transfer = <Transfer {'transfer_type': 0, 'min_transfer_time': None, '_schedule': 
<weakproxy at 00CB6570 to instance at 00CB7A30>, 'from_stop_id': u'\x1a'}>
    self = <transitfeed._transitfeed.Schedule instance at 0x00CB7A30>
    problem_reporter = <__main__.HTMLCountingProblemReporter instance at 0x00CAFA58>

File "transitfeed\_transitfeed.pyc", line 2522, in Validate
    self = <Transfer {'transfer_type': 0, 'min_transfer_time': None, '_schedule': 
<weakproxy at 00CB6570 to instance at 00CB7A30>, 'from_stop_id': u'\x1a'}>
    problems = <__main__.HTMLCountingProblemReporter instance at 0x00CAFA58>

AttributeError: 'Transfer' object has no attribute 'to_stop_id'

http://code.google.com/p/googletransitdatafeed/source/browse/tags/transitfeed-
1.2.5/python/transitfeed/_transitfeed.py?r=1252

Line 2522 is in Transfer.Validate:   if IsEmpty(self.to_stop_id)

I'm pretty sure r1258 fixed this but don't see a test in 
TransferObjectTestCase. Lets add 
one before marking this fixed.

Work-arounds:

Use the latest trunk version from subversion instead of 1.2.5 or add an empty 
to_stop_id 
column in transfers.txt.

Original comment by tom.brow...@gmail.com on 15 Jan 2010 at 1:22

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

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