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

Getting an error #10

Open
mady143 opened this issue Feb 5, 2020 · 1 comment
Open

Getting an error #10

mady143 opened this issue Feb 5, 2020 · 1 comment

Comments

@mady143
Copy link

mady143 commented Feb 5, 2020

Hi @PoorvaRane @yanghoonkim ,

I am getting an error while running the Test Model
Error:-

UnicodeEncodeError: 'ascii' codec can't encode character u'\xed' in position 25: ordinal not in range(128) python2.7

for the following code
f.write(sentence.encode("utf-8"))

could you please help me to resolve this issue

Thanks & Regards,
Manikantha Sekhar

@SideOfTheRoad
Copy link

SideOfTheRoad commented Mar 31, 2020

Hi @PoorvaRane @yanghoonkim ,

I am getting an error while running the Test Model
Error:-

UnicodeEncodeError: 'ascii' codec can't encode character u'\xed' in position 25: ordinal not in range(128) python2.7

for the following code
f.write(sentence.encode("utf-8"))

could you please help me to resolve this issue

Thanks & Regards,
Manikantha Sekhar

Hello! it is maybe an Encoding problem.
you can add some code on the top of the main.py code.

import sys
defaultencoding = 'utf-8'
if sys.getdefaultencoding() != defaultencoding:
    reload(sys)
    sys.setdefaultencoding(defaultencoding)

I think it can help you!

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