reddit-place-script-2022
reddit-place-script-2022 copied to clipboard
Bug: KeyError: '#452A00'
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'
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
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)
I was wondering where that hex was coming from
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
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.
i believe this was fixed in #319. transparent png images should now work without any modifications