robsideshow / mbta-bustracker

Tracks all MBTA buses and subway trains
11 stars 4 forks source link

Having issue getting the python app running #91

Open chaoranxie opened 8 years ago

chaoranxie commented 8 years ago

I got to the point where i will need to generate some json files. Can you update the documentation about what needs to be done to fix that

/Users/cxie/.virtualenvs/mbta/lib/python2.7/site-packages/flask/exthook.py:71: ExtDeprecationWarning: Importing flask.ext.assets is deprecated, use flask_assets instead.
  .format(x=modname), ExtDeprecationWarning
/Users/cxie/.virtualenvs/mbta/lib/python2.7/site-packages/flask/exthook.py:71: ExtDeprecationWarning: Importing flask.ext.script is deprecated, use flask_script instead.
  .format(x=modname), ExtDeprecationWarning
Traceback (most recent call last):
  File "flaskbus.py", line 10, in <module>
    import bustracker as btr
  File "/Users/cxie/development/mbta-bustracker/bustracker.py", line 44, in <module>
    with open('data/shapepathdict.json', 'r') as f:
IOError: [Errno 2] No such file or directory: 'data/shapepathdict.json'
robsideshow commented 8 years ago

Hi Chao. Sorry about that. Probably the easiest/fastest way to get up and running is to go back two commits: https://github.com/robsideshow/mbta-bustracker/tree/8b46a930ccc0575ade713f49385005510104a051

The json files were in the repo until VERY recently. They are in the data directory at that point in the history.

Alternatively, I hope to finish implementing automation of checking for and then generating those files within the next day or two.

Basically, the text files they are based on can be downloaded from: http://www.mbta.com/uploadedfiles/MBTA_GTFS.zip

unzip that into a directory called MBTA_GTFS_texts/ Then run the makeAllDicts() function in the dictmaker.py module. The json files produced by that function should then be put in a data\ directory.