Closed unreasonableman closed 4 years ago
I got same error when pointing to URLs that weren't the test MBTA URL.
Assuming it's not an issue with the GTFS data itself, my guess is that this is related to redirects and the gtfs-validator not handling them correctly. We had a similar issue with the GTFS-realtime validator - see https://github.com/CUTR-at-USF/gtfs-realtime-validator/issues/89.
@barbeau I don't think it's a redirect issue. The log entries above show the validator actually working through the zip contents
@unreasonableman That's possible, more debugging is certainly needed.
@e-lo Do you have examples of the other URLs that failed with the same error?
@barbeau - I shut down the shell where I got the NullPointerException so unfortunately I can't say with certainty. But looking back through my current open shell I have some more bugs to report which I will open now (which could def also be user error / would benefit from more explicit doc'tn)
Thank you for reporting. We have identified the bug. The validator doesn't correctly handle route records for which no agencyId is provided, per spec when the dataset doesn't provide route for multiple agencies. I will follow up here when we have a snapshot version with the fix.
Hello,
Please find v1.3.0-SNAPSHOT containing the fix.
Describe the bug The validator crashes with an NPE when running against the SBC GTFS URL.
To Reproduce java -jar gtfs-validator-v1.2.2.jar -u http://www.cleanairexpress.com/GTFS/07.24%20COVID-19%20CAE%20GTFS.zip
Expected behavior The validator does not crash when running on vanilla zips.
Witnessed behavior [WARN ] 2020-09-23 11:55:26.480 [main] Main - Configuration file execution-parameters.json not found in working directory [INFO ] 2020-09-23 11:55:26.485 [main] Main - Retrieving execution parameters from command-line [INFO ] 2020-09-23 11:55:26.797 [main] Main - --url provided but no location to place zip (--zip option). Using default: /Users/wildcard/tmp/gtfs-validator/input.zip [INFO ] 2020-09-23 11:55:26.802 [main] Main - --input not provided. Will extract zip content in: /Users/wildcard/tmp/gtfs-validator/input [INFO ] 2020-09-23 11:55:26.803 [main] Main - --output not provided. Will place execution results in: /Users/wildcard/tmp/gtfs-validator/output [INFO ] 2020-09-23 11:55:26.804 [main] Main - Downloading archive [INFO ] 2020-09-23 11:55:27.490 [main] Main - Unzipping archive [INFO ] 2020-09-23 11:55:27.507 [main] Main - No file to exclude -- will execute validation process on all files [INFO ] 2020-09-23 11:55:27.510 [main] Main - List of filenames to exclude is: [] [INFO ] 2020-09-23 11:55:27.510 [main] Main - Will execute validation on the following subset of files: [agency.txt, stops.txt, routes.txt, trips.txt, stop_times.txt, feed_info.txt, calendar.txt, calendar_dates.txt, shapes.txt] [INFO ] 2020-09-23 11:55:27.523 [main] Main - Validate CSV structure and field types for file: agency.txt [INFO ] 2020-09-23 11:55:27.525 [main] Main - Validating rule 'E_039 & W_009 - Empty file'
[INFO ] 2020-09-23 11:55:27.546 [main] Main - Validating rules :'E001 - Missing required field [INFO ] 2020-09-23 11:55:27.546 [main] Main - 'E043 - Duplicated field [INFO ] 2020-09-23 11:55:27.546 [main] Main - 'W002 - Non standard field name [INFO ] 2020-09-23 11:55:27.567 [main] Main - Validate CSV structure and field types for file: stops.txt [INFO ] 2020-09-23 11:55:27.567 [main] Main - Validating rule 'E_039 & W_009 - Empty file'
[INFO ] 2020-09-23 11:55:27.569 [main] Main - Validating rules :'E001 - Missing required field [INFO ] 2020-09-23 11:55:27.569 [main] Main - 'E043 - Duplicated field [INFO ] 2020-09-23 11:55:27.569 [main] Main - 'W002 - Non standard field name [INFO ] 2020-09-23 11:55:27.592 [main] Main - Validate CSV structure and field types for file: routes.txt [INFO ] 2020-09-23 11:55:27.592 [main] Main - Validating rule 'E_039 & W_009 - Empty file'
[INFO ] 2020-09-23 11:55:27.594 [main] Main - Validating rules :'E001 - Missing required field [INFO ] 2020-09-23 11:55:27.594 [main] Main - 'E043 - Duplicated field [INFO ] 2020-09-23 11:55:27.594 [main] Main - 'W002 - Non standard field name Exception in thread "main" java.lang.NullPointerException at org.mobilitydata.gtfsvalidator.domain.entity.gtfs.routes.Route$RouteBuilder.build(Route.java:281) at org.mobilitydata.gtfsvalidator.usecase.ProcessParsedRoute.execute(ProcessParsedRoute.java:80) at org.mobilitydata.gtfsvalidator.Main.lambda$main$0(Main.java:113) at java.base/java.util.ArrayList.forEach(ArrayList.java:1541) at org.mobilitydata.gtfsvalidator.Main.main(Main.java:94)
Environment used