RhinoRhys / radarr-collections

Movie discovery tool for Radarr to follow Movie Collections and People's work.
GNU General Public License v3.0
146 stars 10 forks source link

UnicodeEncodeError: 'ascii' codec can't encode character #117

Closed xderor closed 3 years ago

xderor commented 3 years ago

crashed on a movie with a Thai name

[21-08-12 19:35:24] >      อยากรัก ก็รักเลย (ID: 690680): 3 Movies in collection:

[21-08-12 19:35:24] >>    Radarr ID: 1551   TMDB ID: 64786     Yes or No (2010)                                                                                                                                In Database
[21-08-12 19:35:24] >>                      TMDB ID: 367805    Yes or No 2.5 (2015)                                                                                                                            Adding to Wanted
Traceback (most recent call last):
  File "rcm.py", line 517, in <module>
    else: tmdb_check(movie["tmdbId"])
  File "rcm.py", line 283, in tmdb_check
    collection_check(col_id, tmdbId)
  File "rcm.py", line 271, in collection_check
    for id_check in parts:  database_check(id_check, white_name, col_json, input_id)
  File "rcm.py", line 229, in database_check
    payload = words[u'text'][u'found'].format(name.encode(), white_name, post_data[u'tmdbId'], white_cid, post_data['title'], post_data['year'])
UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-6: ordinal not in range(128)
Found 18 Movies

Thank You for using Radarr Collection and People Manager by u/RhinoRhys
RhinoRhys commented 3 years ago

Ah damn, I forgot to put the utf-8 in the encode(). The script is compatible with python 2 but you should consider upgrading to python 3 as 2 is no longer being developed as of a few months ago.

xderor commented 3 years ago

I do have python 3 installed but it seem to just like to use python 2 all the for some resason, Thanks

RhinoRhys commented 3 years ago

Ah in that case you need to run programs by using the command python3 rcm.py ..... :)