ryelogheat / xpbot

Analyze a media file, identify the TMDB/IMDB, and generate all the necessary info to upload a torrent to a private tracker using the UNIT3D codebase
56 stars 27 forks source link

UnicodeEncodeError: 'charmap' codec can't encode character '\u2764' in position 30: character maps to <undefined> #27

Closed Ruke805 closed 3 years ago

Ruke805 commented 3 years ago

Hi, I'm getting this error. Could someone help me? image

Thanks

ryelogheat commented 3 years ago

It has to do with the emoji/message that gets added to the bottom of the description

The easiest way to fix it would be to just get rid of the emoji, to do that you need to open auto_upload.py and make your way to line number 1921

That line (1921) should look like this: description.write(f'{bbcode_line_break}{bbcode_line_break} Uploaded with [color=red]{"<3" if str(tracker).upper() == "BHD" else "❤"}[/color] using [url=https://github.com/ryelogheat/xpbot]XpBot[/url][/center]')

Delete the whole thing and instead paste this line: description.write(f'{bbcode_line_break}{bbcode_line_break} Uploaded with [color=red]<3[/color] using [url=https://github.com/ryelogheat/xpbot]XpBot[/url][/center]')

Make sure you put the new line in the same spot as the old one (use spaces) otherwise you might get a inconsistent use of tabs and spaces error & the script won't run

Ruke805 commented 3 years ago

Nice! Worked well, thanks!