You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using word_freqs [username] [/u/username] --verbose
I ran into this error with out_text
Traceback (most recent call last): File "C:\Python27\Scripts\word_freqs-script.py", line 9, in <module> load_entry_point('redditanalysis==1.0.4', 'console_scripts', 'word_freqs')() File "c:\python27\lib\site-packages\redditanalysis\__init__.py", line 400, in main out_text = str("{0}:{1}\n".format(word, popular_words[word])) UnicodeEncodeError: 'ascii' codec can't encode character u'\u0296' in position 0: ordinal not in range(128)
Encoding late will solve this issue and both instances of out_text on lines 404 and 419 in
When using word_freqs [username] [/u/username] --verbose
I ran into this error with out_text
Traceback (most recent call last): File "C:\Python27\Scripts\word_freqs-script.py", line 9, in <module> load_entry_point('redditanalysis==1.0.4', 'console_scripts', 'word_freqs')() File "c:\python27\lib\site-packages\redditanalysis\__init__.py", line 400, in main out_text = str("{0}:{1}\n".format(word, popular_words[word])) UnicodeEncodeError: 'ascii' codec can't encode character u'\u0296' in position 0: ordinal not in range(128)
Encoding late will solve this issue and both instances of out_text on lines 404 and 419 in
\lib\site-packages\redditanalysis\__init__.py
can be changed from
out_text = str("{0}:{1}\n".format(word, popular_words[word]))
to
out_text = str("{0}:{1}\n".format(word.encode('utf-8'), popular_words[word]))
The text was updated successfully, but these errors were encountered: