overlay icon indicating copy to clipboard operation
overlay copied to clipboard

_tkinter.TclError: unknown color name "1"

Open jcarlosroldan opened this issue 4 years ago • 9 comments

When running any of the examples on Python 3.8 over Windows 10, I get the same "unknown color name" error.

When I run

from overlay import Window

win = Window()
Window.launch()

I get

Traceback (most recent call last):
  File "D:\Desktop\test.py", line 3, in <module>
    win = Window()
  File "D:\ProgramData\Anaconda3\lib\site-packages\overlay\window.py", line 63, in __init__
    self._root.wm_attributes('-transparent', True)
  File "D:\ProgramData\Anaconda3\lib\tkinter\__init__.py", line 1788, in wm_attributes
    return self.tk.call(args)
_tkinter.TclError: unknown color name "1"

jcarlosroldan avatar Oct 20 '20 15:10 jcarlosroldan

Having the same issue.

spinnelein avatar Nov 02 '20 17:11 spinnelein

Same issue also.

aleaforny avatar Nov 18 '20 20:11 aleaforny

Same issue here (Windows 10)

rafaelurben avatar Dec 03 '20 10:12 rafaelurben

in file window.py change True //self._root.wm_attributes('-transparent', True) to "name_of_color" Ex self._root.wm_attributes('-transparent', "white") it's work for me

hiiamtin avatar Feb 28 '21 14:02 hiiamtin

in file window.py change True //self._root.wm_attributes('-transparent', True) to "name_of_color" Ex self._root.wm_attributes('-transparent', "white") it's work for me

same issue still, but this works

j-h-m avatar Jun 07 '21 20:06 j-h-m

in file window.py change True //self._root.wm_attributes('-transparent', True) to "name_of_color" Ex self._root.wm_attributes('-transparent', "white") it's work for me

It works for me too

Xyndra avatar Jan 23 '22 10:01 Xyndra

in file window.py change True //self._root.wm_attributes('-transparent', True) to "name_of_color" Ex self._root.wm_attributes('-transparent', "white") it's work for me

It works for me too

Where and what to replace? I am in window.py and I clicked Ctrl + F (find), and there is no "True //self._root.wm_attributes('-transparent', True)"

akisha009 avatar Oct 24 '22 13:10 akisha009

@akisha009

Where and what to replace? I am in window.py and I clicked Ctrl + F (find), and there is no "True //self._root.wm_attributes('-transparent', True)"

You need to replace self._root.wm_attributes('-transparent', True) with self._root.wm_attributes('-transparent', "white") (= replace True with "white")

https://github.com/davidmaamoaix/overlay/blob/ebfba98729d77a91e77777a514039abdb86c3e5b/overlay/window.py#L63

rafaelurben avatar Oct 24 '22 15:10 rafaelurben

PR #8 will fix this

catdogmat avatar Feb 04 '23 00:02 catdogmat