wodsuz/EasyApplyJobsBot

UnicodeEncodeError: 'gbk' codec can't encode character '\U0001f916'

weblearn22 opened this issue · 1 comments

I am using windows OS and the system throw this error message:

File "...\EasyApplyJobsBot\linkedin.py", line 258, in
Linkedin().linkJobApply()

File "...\EasyApplyJobsBot\linkedin.py", line 13, in init
utils.prYellow("\U0001f916 Thanks for using Easy Apply Jobs bot, for more information you can visit our site - www.automated-bots.com")
File "...\EasyApplyJobsBot\utils.py", line 36, in prYellow
print(f"\033[93m{prt}\033[00m")
UnicodeEncodeError: 'gbk' codec can't encode character '\U0001f916' in position 5: illegal multibyte sequence

The system default enconder is utf-8. Is there a way to fix this issue? Thanks!

fixed it, easy fix is to add:
import sys
sys.stdout.reconfigure(encoding='utf-8')

at the top of the linkedin.py and utils.py files