Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
weblearn22 opened this issue Dec 27, 2023 · 1 comment
Open

Comments

@weblearn22
Copy link

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!

@hilda04
Copy link

hilda04 commented Jan 16, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants