Closed ndhuanhuan closed 6 years ago
Seems like read_cached() can't read the file and returns None. Please check that you have ''2017-08-15_2017-09-11_new'' in a right place, you can also try to delete cached .pkl file (it will be recreated on next run)
I renamed the file "2017-08-15_2017-09-11.csv.zip" to "2017-08-15_2017-09-11_new.csv.zip" and the feature-making step works fine now.
@xiaoyu-wu, I renamed it and it works now. Thanks!
Fixed make_features.py, it was my mistake - I had cached 2017-08-15_2017-09-11_new.pkl file in a working directory. Thank you for bugreport!
When I execute "python make_features.py data/vars --add_days=63", I got following error:
Traceback (most recent call last): File "make_features.py", line 349, in
run()
File "make_features.py", line 273, in run
df, nans, starts, ends = prepare_data(args.start, args.end, args.valid_thres
hold)
File "make_features.py", line 176, in prepare_data
df = read_x(start, end)
File "make_features.py", line 75, in read_x
df = read_all()
File "make_features.py", line 48, in read_all
scraped = read_file('2017-08-15_2017-09-11_new')
File "make_features.py", line 36, in read_file
df = read_cached(file).set_index('Page')
AttributeError: 'NoneType' object has no attribute 'set_index'
I'm using Python 3.6.3, pandas 0.22.0. Thanks!