WRI-Cities / static-GTFS-manager

GUI interface for creating, editing, exporting of static GTFS data for a public transit authority
GNU General Public License v3.0
148 stars 46 forks source link

500: Internal Server Error when adding a new shape to existing GTFS #173

Open mkbs-mkbs2000 opened 1 week ago

mkbs-mkbs2000 commented 1 week ago

Screenshot 2024-11-15 164041

Operating system

Windows 10 64-bit

Python version

Running in the virtual environment (via the .exe application)

Problem description

I want to upload the shapefile for the new Ontario Line in Toronto. I have converted it to WGS 84 and in geojson format, but it still says 500: Internal Server Error

Console / terminal output if any

static GTFS Manager Fork it on Github: https://github.com/WRI-Cities/static-GTFS-manager/ Starting up the program, loading dependencies, please wait...

Loaded dependencies, starting static GTFS Manager program.

Open http://localhost:5000 in your Web Browser if you don't see it opening automatically in 5 seconds.

Note: If this is through docker, then it's not going to auto-open in browser, don't wait. C:\Users\Khalis\AppData\Local\Temp_MEI38202\urllib3\connectionpool.py:847: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings

pastCommits GET call pastCommits GET call took 0.0 seconds.

stats GET call readTableDB: Loaded agency, 1 records agency : 1 entries calendar : 9 entries stops : 9,388 entries routes : 217 entries trips : 99,178 entries stop_times : 3,316,390 entries calendar_dates : 75 entries fare_attributes : 0 entries fare_rules : 0 entries shapes : 401,337 entries frequencies : 0 entries transfers : 0 entries feed_info : 0 entries stats GET call took 0.47 seconds. C:\Users\Khalis\AppData\Local\Temp_MEI38202\urllib3\connectionpool.py:847: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings

allShapesList GET call allShapesList GET call took 0.02 seconds.

allStopsKeyed GET call readTableDB: Loaded stops, 9388 records allStopsKeyed GET call took 0.25 seconds.

tableReadSave GET call for table=routes readTableDB: Loaded routes, 217 records C:\Users\Khalis\AppData\Local\Temp_MEI38202\urllib3\connectionpool.py:847: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings tableReadSave GET call for table=routes took 0.02 seconds.

sequence GET call sequence not found in sequence DB file, so extracting from gtfs tables instead. readTableDB: table:trips, column:route_id, value:"1001" readTableDB: Loaded trips, 0 records extractSequencefromGTFS: no trips found for 1001. Skipping. sequence GET call took 1.38 seconds.

shapesList GET call readTableDB: table:trips, column:route_id, value:"1001" readTableDB: Loaded trips, 0 records shapesList GET call took 1.41 seconds.

shape POST call 1001 10000 False Saving filename: OL_4326.geojson to uploads/ OL_4326.geojson Loaded uploads/OL_4326.geojson ERROR:tornado.application:Uncaught exception POST /API/shape?pw=program&route=1001&id=10000&reverseFlag=false (::1) HTTPServerRequest(protocol='http', host='localhost:5000', method='POST', uri='/API/shape?pw=program&route=1001&id=10000&reverseFlag=false', version='HTTP/1.1', remote_ip='::1') Traceback (most recent call last): File "site-packages\tornado\web.py", line 1590, in _execute File "GTFSManager.py", line 1008, in post reverseFlag = self.get_argument('reverseFlag', default=False) == 'true' File "", line 929, in geoJson2shape File "", line 874, in lat_long_dist TypeError: float() argument must be a string or a number, not 'list' ERROR:tornado.access:500 POST /API/shape?pw=program&route=1001&id=10000&reverseFlag=false (::1) 338.02ms

Expected Action

I shld be able to upload it and then set the stops for the line

Details of data you are working with, if relevant

Q: Is there anything peculiar about the data you are working with, which may be causing the issue? Any extra files in the feed? Extra columns? Any mandatory columns/fields omitted?
A: <!--- enter answer here --->

Q: What is the size of the dataset : how many lines in stops.txt, routes.txt and stop_times.txt?
A: <!--- enter answer here --->

Q: Are you starting a new feed from scratch and haven't filled in any of the other files like calendar.txt?
A: <!--- enter answer here ---> I am building on the existing TTC GTFS

Anything else