linuxtkintertcltk-toolkitchromebook

Error launching Python IDLE via Crostini Terminal tkinter.TclError


I recently got a Lenovo Duet Chromebook and had started using the Linux terminal to install Python and was using the IDLE Shell to run some basic commands. This was working fine until today, and now IDLE is failing to launch.

If I launch IDLE from the app drawer, then it pops up, but then instantly closes.

Running from the Terminal, I get the following error:

X Error of failed request: BadDrawable (invalid Pixmap or Window parameter) 
  Major opcode of failed request: 55 (X_CreateGC) 
  Resource id in failed request: 0x40004a 
  Serial number of failed request: 1142 
  Current serial number in output stream: 1152

If I try to launch again, I get a slightly different error:

    Traceback (most recent call last):
File "/usr/bin/idle", line 5, in <module> main()
File "/usr/lib/python3.9/idlelib/pyshell.py", line 1483, in main root = Tk(className="Idle")
File "/usr/lib/python3.9/tkinter/init.py", line 2270, in init self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
_tkinter.TclError: couldn't connect to display ":0"

I've tried turning off Linux and back on, and installing the packages again. I tried a powerwash as well, but after installing everything I still get the same error.


Solution

  • Issue has been resolved by a ChromeOS update, details here: https://bugs.chromium.org/p/chromium/issues/detail?id=1314921