rjurney / Agile_Data_Code_2

Code for Agile Data Science 2.0, O'Reilly 2017, Second Edition
http://bit.ly/agile_data_science
MIT License
456 stars 307 forks source link

ch06/enrich_airlines_wikipedia.py #18

Closed md6nguyen closed 7 years ago

md6nguyen commented 7 years ago

In ch06/enrich_airlines_wikipedia.py throws error because it cannot find the file 'data/our_airlines.jsonl'. I checked the data directory I only found the file 'data/our_airlines.json'

our_airlines = utils.read_json_lines_file('data/our_airlines.jsonl') Traceback (most recent call last): File "", line 1, in File "/home/ubuntu/Agile_Data_Code_2/lib/utils.py", line 29, in read_json_lines_file f = codecs.open(path, "r", "utf-8") File "/home/ubuntu/anaconda/lib/python3.5/codecs.py", line 895, in open file = builtins.open(filename, mode, buffering) FileNotFoundError: [Errno 2] No such file or directory: 'data/our_airlines.jsonl'

rjurney commented 7 years ago

There is a line earlier in chapter 6, that says to: cp data/our_airlines.json/part* data/our_airlines.jsonl

But I will add a line that does this in the script.

See: https://github.com/rjurney/Agile_Data_Code_2/commit/b99aa1948c48b62e0898ac14c36205450aaf9811