crocovert / networks

GNU General Public License v3.0
19 stars 3 forks source link

Muslim timetable network: indexError #13

Closed RogierMeerlo closed 4 years ago

RogierMeerlo commented 4 years ago

I have been trying to create a network analysis in QGIS using your software but when we try to run the musliw timetable network on the prepared GTFS dataset we get the following error (list index outof range). I have tried looking in the code but I can't spot anything wrong because my Python skill are still on a beginner level.

We used the following data to run the analysis http://gtfs.ovapi.nl/openov-nl/

Hopefully we just missed an obvious step in the preparation of the data but it would be awesome if you could help out.

QGIS version: 3.10.4-A Coruña QGIS code revision: 10bc9f2ff2 Qt version: 5.11.2 GDAL version: 3.0.4 GEOS version: 3.8.1-CAPI-1.13.3 PROJ version: Rel. 6.3.1, February 10th, 2020 Processing algorithm… Algorithm 'Musliw timetable network' starting… Input parameters: { 'DEBUT_PERIODE' : '13/1/2020', 'FIN_PERIODE' : '14/1/2020', 'INPUT' : 'D:\SAC_Groningen\SAC data\Prepared_GTFS\NL', 'OUTPUT' : 'D:/SAC_Groningen/SAC data/Musliw timetable network/Test.txt' }

Reading stops Reading routes Reading trips Reading calendars_dates Reading calendars Reading stop_times Traceback (most recent call last): File "C:/Users/User/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\networks\reseau_tc.py", line 538, in processAlgorithm google_stop_times = self.lit_google_stop_times( "stop_times.txt") File "C:/Users/User/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\networks\reseau_tc.py", line 417, in lit_google_stop_times h2 = elements[headers["departure_time"]].split(':') IndexError: list index out of range

Execution failed after 3.44 seconds

crocovert commented 4 years ago

Hello, Thank you There was a bug in the prepare GTFS algorithm. It writes wrong headers. The headers corresponding to data were correct but it still wrote extra data headers, and departure_time appears twice. I fixed it and will put a new version of the plugin but you can fix it now in removing in the stop_times.txt file of your prepared gtfs data the header after stop_sequence

I see that you have chosen from 13/01/2020 to 14/01/2020 as dates. But when I look at your calendar_dates.txt file, it seems that information on services only begins the 05/05/2020. You should choose a date later than 05/05/2020

Bbest regards

Le 07/05/2020 12:29, > RogierMeerlo a écrit :

I have been trying to create a network analysis in QGIS using your software but when we try to run the musliw timetable network on the prepared GTFS dataset we get the following error (list index outof range). I have tried looking in the code but I can't spot anything wrong because my Python skill are still on a beginner level.

We used the following data to run the analysis http://gtfs.ovapi.nl/openov-nl/

Hopefully we just missed an obvious step in the preparation of the data but it would be awesome if you could help out.

QGIS version: 3.10.4-A Coruña QGIS code revision: 10bc9f2ff2 Qt version: 5.11.2 GDAL version: 3.0.4 GEOS version: 3.8.1-CAPI-1.13.3 PROJ version: Rel. 6.3.1, February 10th, 2020 Processing algorithm… Algorithm 'Musliw timetable network' starting… Input parameters: { 'DEBUT_PERIODE' : '13/1/2020', 'FIN_PERIODE' : '14/1/2020', 'INPUT' : 'D:\SAC_Groningen\SAC data\Prepared_GTFS\NL', 'OUTPUT' : 'D:/SAC_Groningen/SAC data/Musliw timetable network/Test.txt' }

Reading stops Reading routes Reading trips Reading calendars_dates Reading calendars Reading stop_times Traceback (most recent call last): File "C:/Users/User/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\networks\reseau_tc.py", line 538, in processAlgorithm google_stop_times = self.lit_google_stop_times( "stop_times.txt") File "C:/Users/User/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\networks\reseau_tc.py", line 417, in lit_google_stop_times h2 = elements[headers["departure_time"]].split(':') IndexError: list index out of range

Execution failed after 3.44 seconds

-- You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub [1], or unsubscribe [2].

Links:

[1] https://github.com/crocovert/networks/issues/13 [2] https://github.com/notifications/unsubscribe-auth/ACI4AYKDYQ3UTLWAVKHV6TLRQKEPTANCNFSM4M3GN6IA

RogierMeerlo commented 4 years ago

Hey,

thank you for the incredibly quick reply and fix. Ahh I did look for any spelling errors in the headers but I didn't think to look for any duplicates.

Ohh great that you spot it! We were trying to figure out why the calender_dates was giving some weird results with 0 traffic on all days for certain routes. I will look into it to see if i can fix it.

Once again thank you very much for your time, this was incredibly helpful because we were totally stuck :D

best regards!

crocovert commented 4 years ago

The new plugin version has been uploaded. It's not yet approved, but you can already download it
https://plugins.qgis.org/plugins/networks/version/2.4.3/

Best regards

Le 07/05/2020 15:38, > RogierMeerlo a écrit :

Hey,

thank you for the incredibly quick reply and fix. Ahh I did look for any spelling errors in the headers but I didn't think to look for any duplicates.

Ohh great that you spot it! We were trying to figure out why the calender_dates was giving some weird results with 0 traffic on all days for certain routes. I will look into it to see if i can fix it.

Once again thank you very much for your time, this was incredibly helpful because we were totally stuck :D

best regards!

-- You are receiving this because you commented. Reply to this email directly, view it on GitHub [1], or unsubscribe [2].

Links:

[1] https://github.com/crocovert/networks/issues/13#issuecomment-625260930 [2] https://github.com/notifications/unsubscribe-auth/ACI4AYJPICMFQBMZETSJ6QLRQK2T5ANCNFSM4M3GN6IA