reallistic / BitcasaFileLister

List and download files in your bitcasa drive via api
https://rose-llc.com/bitcasafilelist/
16 stars 3 forks source link

Unicode equal comparison failed to convert both arguments to Unicode #51

Closed SoySoy22 closed 10 years ago

SoySoy22 commented 10 years ago

/usr/lib/python2.7/dist-packages/chardet/universaldetector.py:69: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal if aBuf[:3] == '\xEF\xBB\xBF': /usr/lib/python2.7/dist-packages/chardet/universaldetector.py:72: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal elif aBuf[:4] == '\xFF\xFE\x00\x00': /usr/lib/python2.7/dist-packages/chardet/universaldetector.py:75: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal elif aBuf[:4] == '\x00\x00\xFE\xFF': /usr/lib/python2.7/dist-packages/chardet/universaldetector.py:78: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal elif aBuf[:4] == '\xFE\xFF\x00\x00': /usr/lib/python2.7/dist-packages/chardet/universaldetector.py:81: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal elif aBuf[:4] == '\x00\x00\xFF\xFE': /usr/lib/python2.7/dist-packages/chardet/universaldetector.py:84: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal elif aBuf[:2] == '\xFF\xFE': /usr/lib/python2.7/dist-packages/chardet/universaldetector.py:87: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal

11/10 20:43:46 [Queuer 4][WARNING]: Error encoding to utf-8. Will parse anyway 11/10 20:43:46 [Queuer 4][DEBUG]: Queuing folder listing for Wärme- und Stoffübertragung

11/10 20:43:59 [Download 54][ERROR]: Error. Could not write to /home/silvan/0.6.1/Download/Uni/successfiles.csv. Ending Traceback (most recent call last): File "/home/silvan/0.6.1/BitcasaFileLister/includes/helpers/results.py", line 15, in writeSuccess myfile.write("%s\n" % filept) UnicodeEncodeError: 'ascii' codec can't encode character u'\xe4' in position 74: ordinal not in range(128)

ekoekoazarak commented 10 years ago

Doesn't bitcasaapi always return utf-8? Why do we need guessing?

reallistic commented 10 years ago

I am so happy you said that. It led me to the REAL solution. Although this is an issue with chardet the source issue is a duplicate of #43.