Open araichev opened 8 years ago
I was unable to duplicate this bug. I downloaded the file at the link, and imported it under two different configurations, and it imported correctly both times.
My feed download is a zip file, 4,511,933 bytes, with an md5sum of 2dec5d2e3e58f90344b221a6d1ba0f3c
I tried it with my development configuration of Python 2.7.12, multigtfs master branch, and these packages:
Django==1.9.8
django-extensions==1.6.7
django-nose==1.4.4
jsonfield==1.0.3
multigtfs==master
nose==1.3.7
psycopg2==2.6.2
six==1.10.0
I was also unable to reproduce it with Python 3.4.3 and these packages
Django==1.6.11
django-extensions==1.6.7
django-nose==1.3
jsonfield==1.0.3
multigtfs==0.4.3
nose==1.3.7
psycopg2==2.6.2
six==1.10.0
South==1.0.2
@araichev can you post your copy of the feed somewhere for download? 5MB might be be allowed as a GitHub attachment.
Sorry, my bad!
Turns out the error occurs with a corrupted version of the feed i linked to, one in which the stop IDs in transfers.txt have their leading zeros removed.
Github won't let me attach that file for some reason, but you can create it easily by editing transfers.txt.
The corrupted feed actually fails Google's feed validator, so i don't expect multigtfs to perform well on it, so you can ignore my bug report. Sorry again.
No problem. If it had been a bug, it may not have been back ported to 0.4.3. You may want to start the work of updating to Django 1.8 LTS, so that a multigtfs upgrade would have been possible for a bug fix.
I'm going to leave the bug open with the new title. This does feel like something that could have a more friendly error message, and a simple test to reproduce.
Greetings. Using mult-gtfs v0.4.3, i tried to import this GTFS feed for Fort Lauderdale: http://transitfeeds.com/p/broward-county-transit/49/latest/download and got the following error.
After some debugging, i discovered that the feed is faulty:
transfers.txt
contains stop IDs not present instops.txt
. Fair enough, but it appears that multigtfs is trying to create the stops intransfers.txt
that it can't find instops.txt
, and that causes the error; see https://github.com/tulsawebdevs/django-multi-gtfs/blob/v1.0.0/multigtfs/models/base.py#L153.That seems like a bug to me, because in transfers.txt, which is not present in stops.txt. Skipping this stop."
What do you think?
transfers.txt
will never contain enough data, e.g. stop geography, to properly create stop objects. I'd favor a warning, such as, "Encountered stop IDNow, i didn't test the feed import using multigtfs v1.0.0, but i do see that the offending code block linked above is the same as in version 0.4.3.
Thanks for your attention.