pysentiment icon indicating copy to clipboard operation
pysentiment copied to clipboard

Currencies.txt is not ASCII or UTF-8 encoded.

Open cantabile-kwok opened this issue 4 years ago • 0 comments

In pysentiment/static there are some helper files. But Currencies.txt is encoded with ISO8859 instead of ASCII or UTF-8, which can cause an unexpected encoding error in pysentiment/utils.py#L52. Personally, I encountered this problem and manually solved it by changing pysentiment/utils.py#L52 to be fin = open('%s/%s'%(STATIC_PATH, f), 'rb', encoding="iso8859-1"). It's quite annoying as I only need this simple module to do minor text analysis but have to spend a lot of time tracking this internal error. Hope this can be fixed.

cantabile-kwok avatar Oct 29 '21 06:10 cantabile-kwok