I keep getting an error code when running graphics file

53 views Asked by At

For my comp sci 1 class, we are required to do a project using the graphics.py be Zelle file on pycharm. I keep getting this issue when running my code, and cannot successfully complete it without receiving this error:

Traceback (most recent call last):
  File "/Users/gabbymacdonald/PycharmProjects/GabrielleMacDonaldProject2/Drawing Shapes.py", line 65, in <module>
    main()
  File "/Users/gabbymacdonald/PycharmProjects/GabrielleMacDonaldProject2/Drawing Shapes.py", line 22, in main
    rect.draw(win)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/graphics.py", line 484, in draw
    self.id = self._draw(graphwin, self.config)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/graphics.py", line 614, in _draw
    return canvas.create_rectangle(x1,y1,x2,y2,options)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/tkinter/__init__.py", line 2835, in create_rectangle
    return self._create('rectangle', args, kw)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/tkinter/__init__.py", line 2805, in _create
    return self.tk.getint(self.tk.call(
_tkinter.TclError: unknown color name "5"'

I am honestly not quite sure what is going wrong, I thought this was just an intro class lol.

0

There are 0 answers