Open kenorb opened 9 years ago
Fixed and merged.
Still there is a problem:
./dl_bt_dukascopy.py -c -p AUDJPY -y 2007 -m 10
Downloading http://www.dukascopy.com/datafeed/AUDJPY/2007/09/25/02h_ticks.bi5 into: download/dukascopy/AUDJPY/2007/10/2007-10-25--02h_ticks.bi5...
File (download/dukascopy/AUDJPY/2007/10/2007-10-25--02h_ticks.bi5) exists, so skipping.
Converting into CSV (download/dukascopy/AUDJPY/2007/10/2007-10-25--02h_ticks.csv)...
Traceback (most recent call last):
File "./dl_bt_dukascopy.py", line 169, in <module>
ds.bt5_to_csv()
File "./dl_bt_dukascopy.py", line 110, in bt5_to_csv
data = f.read()
File "/usr/local/lib/python3.2/dist-packages/backports/lzma/__init__.py", line 287, in read
return self._read_all()
File "/usr/local/lib/python3.2/dist-packages/backports/lzma/__init__.py", line 236, in _read_all
while self._fill_buffer():
File "/usr/local/lib/python3.2/dist-packages/backports/lzma/__init__.py", line 223, in _fill_buffer
raise EOFError("Compressed file ended before the "
EOFError: Compressed file ended before the end-of-stream marker was reached
$ python3 --version
Python 3.2.3
Any clues?
As I experienced, the ideal lzma._BUFFER_SIZE value (which doesn't cause EOFError exception) varies from Python version to Python version, so it's different for e.g. Python 3.2.x and 3.4.x. The solutions could be:
or
PR: #35
Possible workaround:
Command:
Traceback:
It happens randomly. In this case, it happens for: 2013-01-07--01h_ticks.bi5 specifically.