Closed bensdm closed 6 years ago
Could you please paste in the full error message? I think I've ran into something similar before...
File "C:\Anaconda3\envs\tensorflow\lib\encodings\cp1252.py", line 23, in
decode
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 4299
2: character maps to
thanks
Are you on a mac? Also "Anaconda3" - are you using python 3? If so, please switch to 2.7.
Assuming you're on python 2.7 - you could try adding the encoding="utf8"
argument to all of the parts where files are open()
ed - like file = open(filename, encoding="utf8", "r")
thanks for your response, now i've the following error: reverselist = sorted(reverselist) TypeError: '<' not supported between instances of 'bytes' and 'str'
i am on windows and cant install tensorflow with python 2.7 on windows...
it seems that my error comes from the fact that rhyme function sometimes return None
i finaly fix my issue, just needed to delete rhymeslist = [x.encode('UTF8') for x in rhymeslist]
Just a last question, the rhymes and syllables are supposed to remain the same during the whole rap?
Sorry for the delay in response; glad you got it fixed. Sometimes the "remain the same during the whole rap" thing happens; but not a large percentage of the time.
Hi, Great job, i am trying to generate raps with default kanye lines but i have the following error: UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 42992: character maps to
thanks for your help