reddit-place-script-2022 icon indicating copy to clipboard operation
reddit-place-script-2022 copied to clipboard

Bug: KeyError: '#452A00'

Open DeveloperTK opened this issue 2 years ago • 6 comments

I've got this exception

Exception in thread Thread-2:
Traceback (most recent call last):
  File "/usr/local/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/threading.py", line 973, in _bootstrap_inner
    self.run()
  File "/usr/local/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/threading.py", line 910, in run
    self._target(*self._args, **self._kwargs)
  File "/Users/christianschliz/Development/scripts/placebot3/reddit-place-script-2022/main.py", line 696, in task
    pixel_color_index = ColorMapper.COLOR_MAP[new_rgb_hex]
KeyError: '#452A00'

DeveloperTK avatar Apr 03 '22 19:04 DeveloperTK

Just had this, figured out that its the hex for RGB 69,42,0, i changed the transparent colors in my image to that color and everything works now

Arvfitii avatar Apr 03 '22 19:04 Arvfitii

Just had this, figured out that its the hex for RGB 69,42,0, i changed the transparent colors in my image to that color and everything works now

(**the script treats pixels of that color as transparent)

Arvfitii avatar Apr 03 '22 19:04 Arvfitii

I was wondering where that hex was coming from

ixi2101 avatar Apr 03 '22 19:04 ixi2101

Just had this, figured out that its the hex for RGB 69,42,0, i changed the transparent colors in my image to that color and everything works now

how did you do that

end-me-please avatar Apr 03 '22 20:04 end-me-please

I would use an image editing tool like Gimp (https://www.gimp.org/) to place the png image onto a fully colored rectangle with the color (69,42,0). Then export it as a jpg to be extra safe.

Edit: When you launch Gimp you can use the "new" button to create a Canvas of some size. Then fill it up with the (69,42,0) color. Then drag and drop ur png onto it.

rdeepak2002 avatar Apr 03 '22 21:04 rdeepak2002

i believe this was fixed in #319. transparent png images should now work without any modifications

deemfox avatar Apr 03 '22 23:04 deemfox