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.

classification
Title: IDLE about dialog credits raises UnicodeDecodeError
Type: behavior Stage:
Components: IDLE Versions: Python 3.1
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: ezio.melotti, srid, vstinner
Priority: normal Keywords: patch

Created on 2010-03-22 21:05 by srid, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
idlelib_textView_encoding.patch vstinner, 2010-03-25 01:45
Messages (5)
msg101532 - (view) Author: Sridhar Ratnakumar (srid) Date: 2010-03-22 21:05
Install 3.1.2 -> Open IDLE -> Open "About IDLE" dialog -> click on "Credits"

Exception in Tkinter callback
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/tkinter/__init__.py", line 1399, in __call__
    return self.func(*args)
  File "/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/idlelib/aboutDialog.py", line 123, in ShowIDLECredits
    self.display_file_text('About - Credits', 'CREDITS.txt', 'iso-8859-1')
  File "/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/idlelib/aboutDialog.py", line 138, in display_file_text
    textView.view_file(self, title, fn, encoding)
  File "/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/idlelib/textView.py", line 76, in view_file
    return view_text(parent, title, textFile.read())
  File "/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/codecs.py", line 300, in decode
    (result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf8' codec can't decode bytes in position 1540-1543: invalid data
msg101665 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2010-03-25 01:45
Can you try this patch? The encoding argument was just ignored...
msg101906 - (view) Author: Sridhar Ratnakumar (srid) Date: 2010-03-29 21:17
idlelib_textView_encoding.patch fixes the problem.
msg107838 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2010-06-14 23:04
ping myself: i have to apply the patch.
msg108065 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2010-06-17 21:46
Commited in Python 3.1 (r82058) and 3.2 (r82057).
History
Date User Action Args
2022-04-11 14:56:58adminsetgithub: 52450
2010-06-17 21:46:06vstinnersetstatus: open -> closed
resolution: fixed
messages: + msg108065
2010-06-14 23:04:35vstinnersetmessages: + msg107838
2010-03-29 21:17:22sridsetmessages: + msg101906
2010-03-25 01:45:56vstinnersetfiles: + idlelib_textView_encoding.patch

nosy: + vstinner
messages: + msg101665

keywords: + patch
2010-03-24 23:04:07ezio.melottisetpriority: normal
nosy: + ezio.melotti
2010-03-22 21:05:19sridcreate