Closed cbdmaul closed 9 years ago
It broke shot detection also
Traceback (most recent call last): File "/usr/lib/python2.7/lib-tk/Tkinter.py", line 1489, in call return self.func(_args) File "/usr/lib/python2.7/lib-tk/Tkinter.py", line 536, in callit func(_args) File "shootoff.py", line 158, in detect_shots self.handle_shot(laser_color, x, y) File "shootoff.py", line 187, in handle_shot (x - bbox[0])_x_scale, (y - bbox[1])_y_scale) File "/home/ubuntu/ShootOFF/projector_arena.py", line 23, in handle_shot if "_shape:image" in self._arena_canvas.gettags(region) and self._canvas_manager.is_transparent_pixel(region, x, y): File "/home/ubuntu/ShootOFF/canvas_manager.py", line 380, in is_transparent_pixel hit_location_color = self._image_regions_images[region][LAST_IMAGE_INDEX].getpixel((x, y)) File "/usr/lib/python2.7/dist-packages/PIL/Image.py", line 980, in getpixel return self.im.getpixel(xy) IndexError: image index out of range
I am having a hell of a time duplicating this. I've even put on multiple plate racks with multiple dueling trees, resized and move all of them in different ways, turned on a training protocol, and it still works as expected w/ no exceptions.
Wasn't able to reproduce in newest code
I resized my duel tree and all hell broke loose. It started registering hits on the white line at the bottom of the duel tree and it caused all kinds of problems. Duel tree is now missing a target.
Exception in Tkinter callback Traceback (most recent call last): File "/usr/lib/python2.7/lib-tk/Tkinter.py", line 1489, in call return self.func(*args) File "shootoff.py", line 423, in reset_click self._projector_arena.reset() File "/home/ubuntu/ShootOFF/projector_arena.py", line 51, in reset self._canvas_manager.reset_animations() File "/home/ubuntu/ShootOFF/canvas_manager.py", line 399, in reset_animations self._canvas.itemconfig(region, image=self._image_regions_images[region][FIRST_PHOTOIMAGE_INDEX]) File "/usr/lib/python2.7/lib-tk/Tkinter.py", line 2371, in itemconfigure return self._configure(('itemconfigure', tagOrId), cnf, kw) File "/usr/lib/python2.7/lib-tk/Tkinter.py", line 1265, in _configure self.tk.call(_flatten((self._w, cmd)) + self._options(cnf)) TclError: image "pyimage18809" doesn't exist