Closed olejardamir closed 7 years ago
Same Problem for me. Maybe an Issue with Python2. Try to use Python3 or put this on top of the YahooTickerDownloader.py file.
import sys
reload(sys)
sys.setdefaultencoding("utf-8")
@olejardamir , was it a python2 problem? Is it resolved now?
Yes that is what it was. A second problem was reading the compressed file once the download completed. Sorry for not replying, I simply did not have time.
On Wed, Feb 1, 2017 at 8:11 PM, Benny Jacobs notifications@github.com wrote:
@olejardamir https://github.com/olejardamir , was it a python2 problem? Is it resolved now?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Benny-/Yahoo-ticker-symbol-downloader/issues/19#issuecomment-276835858, or mute the thread https://github.com/notifications/unsubscribe-auth/AD2cazGjON9bUgcguV-aSem9ZYA28EuLks5rYS1TgaJpZM4Lbr5t .
Exporting Stock symbols Traceback (most recent call last): File "/usr/local/bin/YahooTickerDownloader.py", line 147, in
main()
File "/usr/local/bin/YahooTickerDownloader.py", line 135, in main
f.write(data.csv.encode('UTF-8'))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 1543: ordinal not in range(128)