Python3.8 turtle not working

Hi! I was coding in python3.8, and I install tkinter, import turtle, and then i type this:

wn = turtle.Screen()

and then i get this error:

File "<stdin>", line 1, in <module>
  File "/usr/lib/python3.8/turtle.py", line 3661, in Screen
    Turtle._screen = _Screen()
  File "/usr/lib/python3.8/turtle.py", line 3677, in __init__
    _Screen._root = self._root = _Root()
  File "/usr/lib/python3.8/turtle.py", line 434, in __init__
    TK.Tk.__init__(self)
  File "/usr/lib/python3.8/tkinter/__init__.py", line 2261, in __init__
    self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
_tkinter.TclError: unknown color name "BACKGROUND"

I have no idea what is going on. I am using KDE Manjaro ARM on the raspberry pi 4, if that helps. Thanks!

Python lesson number one - read the error message ...

If you don't know what the error means - use your favorite search engine to look it up

https://duckduckgo.com/?q=_tkinter.TclError%3A+unknown+color+name+%22BACKGROUND%22
3 Likes

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.

Forum kindly sponsored by