kathyskead / googletransitdatafeed

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

crash feed validator #271

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.
2.
3.

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

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

Please provide any additional information below.

Hi
Running the feed validator with the attached file, I get the following result:

Yikes, the program threw an unexpected exception!

Hopefully a complete report has been saved to transitfeedcrash.txt,
though if you are seeing this message we've already disappointed you once
today. Please include the report in a new issue at
http://code.google.com/p/googletransitdatafeed/issues/entry
or an email to the public group googletransitdatafeed@googlegroups.com. Sorry!

------------------------------------------------------------
transitfeed version 1.2.6

File "feedvalidator.py", line 688, in main
    feed = D:\AZIENDE\CTP_Napoli\GoogleTransit\20101209\google_transit.zip
    usage = %prog [options] [<input GTFS.zip>]

Validates GTFS file (or directory) <input GTFS.zip> and writes a HTML
report of the results to validation-results.html.

If <input GTFS.zip> is ommited the filename is read from the console. Dragging
a file into the console may enter the filename.

For more information see
http://code.google.com/p/googletransitdatafeed/wiki/FeedValidator

    args = []
    parser = <transitfeed.util.OptionParserLongError instance at 0x02A92F58>
    options = {'check_duplicate_trips': False, 'manual_entry': True, 'extension': None, 'memory_db': False, 'service_gap_interval': 13, 'latest_version': '', 'limit_per_type': 5, 'performance': None, 'output': 'validation-results.html'}

File "feedvalidator.py", line 477, in RunValidationOutputFromOptions
    feed = D:\AZIENDE\CTP_Napoli\GoogleTransit\20101209\google_transit.zip
    options = {'check_duplicate_trips': False, 'manual_entry': True, 'extension': None, 'memory_db': False, 'service_gap_interval': 13, 'latest_version': '', 'limit_per_type': 5, 'performance': None, 'output': 'validation-results.html'}

File "feedvalidator.py", line 484, in RunValidationOutputToFilename
    feed = D:\AZIENDE\CTP_Napoli\GoogleTransit\20101209\google_transit.zip
    output_file = <open file 'validation-results.html', mode 'w' at 0x02A40338>
    options = {'check_duplicate_trips': False, 'manual_entry': True, 'extension': None, 'memory_db': False, 'service_gap_interval': 13, 'latest_version': '', 'limit_per_type': 5, 'performance': None, 'output': 'validation-results.html'}
    output_filename = validation-results.html

File "feedvalidator.py", line 502, in RunValidationOutputToFile
    feed = D:\AZIENDE\CTP_Napoli\GoogleTransit\20101209\google_transit.zip
    accumulator = <__main__.HTMLCountingProblemAccumulator object at 0x02A97B10>
    output_file = <open file 'validation-results.html', mode 'w' at 0x02A40338>
    problems = <transitfeed.problems.ProblemReporter object at 0x02A97710>
    options = {'check_duplicate_trips': False, 'manual_entry': True, 'extension': None, 'memory_db': False, 'service_gap_interval': 13, 'latest_version': '', 'limit_per_type': 5, 'performance': None, 'output': 'validation-results.html'}

File "feedvalidator.py", line 558, in RunValidation
    feed = D:\AZIENDE\CTP_Napoli\GoogleTransit\20101209\google_transit.zip
    problems = <transitfeed.problems.ProblemReporter object at 0x02A97710>
    loader = <transitfeed.loader.Loader instance at 0x02A9FEE0>
    extension_module = <module 'transitfeed' from 'D:\AZIENDE\RegioneToscana\GoogleTransit\transitfeed-windows-binary-1.2.6\library.zip\transitfeed\__init__.pyc'>
    options = {'check_duplicate_trips': False, 'manual_entry': True, 'extension': None, 'memory_db': False, 'service_gap_interval': 13, 'latest_version': '', 'limit_per_type': 5, 'performance': None, 'output': 'validation-results.html'}
    other_problems_string = None
    gtfs_factory = <transitfeed.gtfsfactory.GtfsFactory object at 0x02A9E210>

File "transitfeed\loader.pyc", line 554, in Load
    self = <transitfeed.loader.Loader instance at 0x02A9FEE0>

File "transitfeed\loader.pyc", line 400, in _LoadFeed
    row_num = 429
    d = {'stop_lat': u'', 'stop_name': u' ', 'stop_lon': u'', 'stop_id': u'2131'}
    header = ['stop_id', 'stop_name', 'stop_lat', 'stop_lon', 'location_type']
    self = <transitfeed.loader.Loader instance at 0x02A9FEE0>
    filename = stops.txt
    instance = <Stop [('location_type', 0), ('stop_id', u'2131'), ('stop_lat', u''), ('stop_lon', u''), ('stop_name', u' ')]>
    loading_order = ['agency.txt', 'stops.txt', 'routes.txt', 'transfers.txt', 'trips.txt', 'fare_attributes.txt', 'fare_rules.txt', 'frequencies.txt']
    object_class = <class 'transitfeed.stop.Stop'>
    row = [u'2131', u' ', u'', u'']

File "transitfeed\stop.pyc", line 236, in ValidateBeforeAdd
    self = <Stop [('location_type', 0), ('stop_id', u'2131'), ('stop_lat', u''), ('stop_lon', u''), ('stop_name', u' ')]>
    problems = <transitfeed.problems.ProblemReporter object at 0x02A97710>

File "transitfeed\stop.pyc", line 203, in ValidateStopNotTooCloseToOrigin
    self = <Stop [('location_type', 0), ('stop_id', u'2131'), ('stop_lat', u''), ('stop_lon', u''), ('stop_name', u' ')]>
    problems = <transitfeed.problems.ProblemReporter object at 0x02A97710>

TypeError: bad operand type for abs(): 'unicode'

I look forward to hearing from you.

thanks
pasquale barci

Original issue reported on code.google.com by pasquale...@maior.it on 28 Dec 2010 at 3:47

Attachments:

GoogleCodeExporter commented 8 years ago
You have rows with empty stop_lat or stop_long values in stops.txt. These 
fields are required ans should not contain blanks or empty values (e.g. "") in 
any row.
I will prepare a patch for this issue which reports an error but does not crash 
the Feedvalidator any more. In the meanwhile please remove all empty values 
from your stops.txt.

Original comment by n...@google.com on 3 Jan 2011 at 1:17

GoogleCodeExporter commented 8 years ago

Original comment by bdfer...@google.com on 26 Sep 2014 at 4:51