This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author wyz23x2
Recipients wyz23x2
Date 2020-12-05.15:22:35
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1607181755.9.0.464136103954.issue42578@roundup.psfhosted.org>
In-reply-to
Content
Programmers often stumble over UnicodeDecode/EncodeError during open(), and especially beginners don't know what to do.
There are lots of questions on Stackoverflow:
https://stackoverflow.com/questions/16528468/while-reading-file-on-python-i-got-a-unicodedecodeerror-what-can-i-do-to-resol
https://stackoverflow.com/questions/38186847/python-line-replace-returns-unicodeencodeerror
https://stackoverflow.com/questions/3224268/python-unicode-encode-error
https://stackoverflow.com/questions/50331257/python3-unicodeencodingerror
https://stackoverflow.com/questions/24717808/python-cant-write-to-file-unicodeencodeerror
......
Maybe a helpful tip can be added to the error message.
We have done this before:
>>> (1,)(2, 3)                                                                                                                <stdin>:1: SyntaxWarning: 'tuple' object is not callable; perhaps you missed a comma?
>>> print 3                                                                                                                     
  File "<stdin>", line 1                                                                                                          
    print 3                                                                                                                             
          ^                                                                                                                   SyntaxError: Missing parentheses in call to 'print'. Did you mean print(3)?
History
Date User Action Args
2020-12-05 15:22:35wyz23x2setrecipients: + wyz23x2
2020-12-05 15:22:35wyz23x2setmessageid: <1607181755.9.0.464136103954.issue42578@roundup.psfhosted.org>
2020-12-05 15:22:35wyz23x2linkissue42578 messages
2020-12-05 15:22:35wyz23x2create