IDLE crashes on code completion

Bug #365534 reported by Filipp Ivanov
98
This bug affects 17 people
Affects Status Importance Assigned to Milestone
Python
Fix Released
Unknown
python3.2 (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: idle-python3.0

1.Launch IDLE for Python3
2.Press Ctrl-Space
3.IDLE will crash with traceback:

Traceback (most recent call last):
  File "/usr/bin/idle-python3.0", line 5, in <module>
    main()
  File "/usr/lib/python3.0/idlelib/PyShell.py", line 1407, in main
    root.mainloop()
  File "/usr/lib/python3.0/tkinter/__init__.py", line 1012, in mainloop
    self.tk.mainloop(n)
UnicodeDecodeError: 'utf8' codec can't decode bytes in position 0-1: illegal encoding

Note: selecting Edit->Show Completions seems to work ok

First report: Jaunty
Last check: Oneiric Alpha3

Revision history for this message
Pablo J. E. Rodriguez (rodablo) wrote :

up to day jaunty, same error.

idle3 tests/test_inventory_activity_or_status.py
Traceback (most recent call last):
  File "/usr/bin/idle3", line 5, in <module>
    main()
  File "/usr/lib/python3.0/idlelib/PyShell.py", line 1407, in main
    root.mainloop()
  File "/usr/lib/python3.0/tkinter/__init__.py", line 1012, in mainloop
    self.tk.mainloop(n)
UnicodeDecodeError: 'utf8' codec can't decode bytes in position 0-1: illegal encoding

Revision history for this message
Jacuturu (jacuturu) wrote :

Jaunty, Same error.

Traceback (most recent call last):
  File "/usr/bin/idle3", line 5, in <module>
    main()
  File "/usr/lib/python3.0/idlelib/PyShell.py", line 1407, in main
    root.mainloop()
  File "/usr/lib/python3.0/tkinter/__init__.py", line 1012, in mainloop
    self.tk.mainloop(n)
UnicodeDecodeError: 'utf8' codec can't decode bytes in position 0-1: illegal encoding

Revision history for this message
Aviyam Fischer (aviyam) wrote :

9.04, same error:

Traceback (most recent call last):
  File "/usr/bin/idle-python3.0", line 5, in <module>
    main()
  File "/usr/lib/python3.0/idlelib/PyShell.py", line 1407, in main
    root.mainloop()
  File "/usr/lib/python3.0/tkinter/__init__.py", line 1012, in mainloop
    self.tk.mainloop(n)
UnicodeDecodeError: 'utf8' codec can't decode bytes in position 0-1: illegal encoding

Revision history for this message
Tamás Kiss (tkiss80) wrote :

Today I compiled the newest Python 3.1.1 from the source tarball using Ubuntu Jaunty's Tk 8.5 instead of the default Tk 8.4, and the bug is still present:

Traceback (most recent call last):
  File "idle3", line 5, in <module>
    main()
  File "/opt/Python-3.1.1/lib/python3.1/idlelib/PyShell.py", line 1420, in main
    root.mainloop()
  File "/opt/Python-3.1.1/lib/python3.1/tkinter/__init__.py", line 1009, in mainloop
    self.tk.mainloop(n)
UnicodeDecodeError: 'utf8' codec can't decode bytes in position 0-1: illegal encoding

Revision history for this message
wolfjb (jeff-bowmansarrow) wrote :

Still a problem in 10.04 with stock debs

Traceback (most recent call last):
  File "/usr/bin/idle3", line 5, in <module>
    main()
  File "/usr/lib/python3.1/idlelib/PyShell.py", line 1420, in main
    root.mainloop()
  File "/usr/lib/python3.1/tkinter/__init__.py", line 1012, in mainloop
    self.tk.mainloop(n)
UnicodeDecodeError: 'utf8' codec can't decode bytes in position 0-1: illegal encoding

Revision history for this message
yajo (yajodj) wrote :

Same bug in 10.04

Revision history for this message
Felix Haller (felixhaller) wrote :

same in 10.10

idle3 crashes with the following Traceback:

Traceback (most recent call last):
  File "/usr/bin/idle3", line 5, in <module>
    main()
  File "/usr/lib/python3.1/idlelib/PyShell.py", line 1420, in main
    root.mainloop()
  File "/usr/lib/python3.1/tkinter/__init__.py", line 1012, in mainloop
    self.tk.mainloop(n)
UnicodeDecodeError: 'utf8' codec can't decode byte 0xc0 in position 0: invalid start byte

Revision history for this message
Felix Haller (felixhaller) wrote :

in Interactive Mode a ugly workarround for completion is to use tha TAB Key.

Example:

aba="Test"
abb="Test2"
abc="Test3"

print(a <<<now press the TAB-Key>>>

The Box will show you aba,abb and abc and others...

Revision history for this message
Bruce Pieterse (octoquad) wrote :

Same problem with Natty 11.04 using Python 3.2. I'm presuming the correct hexadecimal to use would be 0x02 (SP) not 0xc0 (Illegal Character) according to http://en.wikipedia.org/wiki/UTF_8#Invalid_byte_sequences. Unfortunately, I'm not familiar with Python yet (was busy learning, when I encountered it) but hopefully someone more experience can get this fixed.
--
Traceback (most recent call last):
  File "/usr/bin/idle3", line 5, in <module>
    main()
  File "/usr/lib/python3.2/idlelib/PyShell.py", line 1427, in main
    root.mainloop()
  File "/usr/lib/python3.2/tkinter/__init__.py", line 1012, in mainloop
    self.tk.mainloop(n)
UnicodeDecodeError: 'utf8' codec can't decode byte 0xc0 in position 0: invalid start byte

affects: python3.0 (Ubuntu) → python3.2 (Ubuntu)
Changed in python3.2 (Ubuntu):
status: New → Confirmed
Revision history for this message
Paolo Sammicheli (xdatap1) wrote :

Oneiric update: idle-python2.6 and idle-python2.7 packages are not affected and idle-python2.3 is still affected

x@oneiric:~$ idle-python3.2
Traceback (most recent call last):
  File "/usr/bin/idle-python3.2", line 5, in <module>
    main()
  File "/usr/lib/python3.2/idlelib/PyShell.py", line 1427, in main
    root.mainloop()
  File "/usr/lib/python3.2/tkinter/__init__.py", line 1012, in mainloop
    self.tk.mainloop(n)
UnicodeDecodeError: 'utf8' codec can't decode byte 0xc0 in position 0: invalid start byte

x@oneiric:~$ apt-cache policy idle-python3.2
idle-python3.2:
  Installato: 3.2.1-1
  Candidato: 3.2.1-1
  Tabella versione:
 *** 3.2.1-1 0
        500 http://it.archive.ubuntu.com/ubuntu/ oneiric/universe i386 Packages
        100 /var/lib/dpkg/status

description: updated
Revision history for this message
Paolo Sammicheli (xdatap1) wrote : apport information

Architecture: i386
DistroRelease: Ubuntu 11.10
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Alpha i386 (20110803.1)
Package: python3.2 3.2.1-1
PackageArchitecture: i386
ProcEnviron:
 LANG=it_IT.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 3.0.0-7.9-generic 3.0.0
Tags: oneiric running-unity
Uname: Linux 3.0.0-7-generic i686
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare

tags: added: apport-collected oneiric running-unity
Revision history for this message
Paolo Sammicheli (xdatap1) wrote : Dependencies.txt

apport information

Changed in python:
status: Unknown → Fix Released
Revision history for this message
Benito Mourelo (benito) wrote :

The fix released for Python Issue1028 was applied to the sources of Python 3.1.4 ( http://hg.python.org/cpython/rev/82cfbe2ddfbb ).

I tested that version 3.2.2-0ubuntu1 of the Ubuntu's package python3.2 and includes the patch but idle continues crashing on my instalation of Ubuntu 11.04 x86_64.

This fix for Python Issue1028 was applied and works in my installation of Fedora 16 x86_64 ( package python3-3.2.1-1.fc16.x86_64 and tk-8.5.11-1.fc16.x86_64 ).

 I suspect that the upstream Python fix is not sufficient in Ubuntu.

Revision history for this message
Benito Mourelo (benito) wrote :

Fixed in 12.04 LTS.

Matthias Klose (doko)
Changed in python3.2 (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.