Rachnog / Deep-Trading

Algorithmic trading with deep learning experiments
1.43k stars 695 forks source link

simpler_forecasting table.csv is opened as a binary file #14

Open gargleblaster opened 6 years ago

gargleblaster commented 6 years ago

I'm not sure why no one has reported this before, so it makes me wonder if the problem is on my end. I got stuck trying to plot the very first chart, and it took some investigation to determine that load_snp_close() was quietly failing to read any data, because of the swallowed exception TypeError: a bytes-like object is required, not 'str'.

I had to change f = open('table.csv', 'rb').readlines()[1:] to f = open('table.csv', 'r').readlines()[1:]

After that, the data was read as expected.