astrand / pyobfuscate

pyobfuscate
GNU General Public License v2.0
606 stars 161 forks source link

UnicodeEncodeError: 'utf-8' codec can't encode character '\ud8c1' in position 157202: surrogates not allowed #23

Open gauthierbuttez opened 4 years ago

gauthierbuttez commented 4 years ago

Hi,

I have Python 3.7.7 and I get this error message when I run copy:

Traceback (most recent call last):
  File "opy.py", line 537, in <module>
    main ()
  File "opy.py", line 520, in main
    targetFile.write (content)
  File "C:\Users\Nino\AppData\Local\Programs\Python\Python37\lib\codecs.py", line 721, in write
    return self.writer.write(data)
  File "C:\Users\Nino\AppData\Local\Programs\Python\Python37\lib\codecs.py", line 377, in write
    data, consumed = self.encode(object, self.errors)
UnicodeEncodeError: 'utf-8' codec can't encode character '\ud8c1' in position 157202: surrogates not allowed

Can you help me please?