neural_question_generation icon indicating copy to clipboard operation
neural_question_generation copied to clipboard

Getting an error

Open mady143 opened this issue 5 years ago • 1 comments

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

mady143 avatar Feb 05 '20 10:02 mady143

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!

SideOfTheRoad avatar Mar 31 '20 08:03 SideOfTheRoad