title: Error when trying to delete items from Tkinter Canvas
body: <p>When I want close the application, I get the following error:</p>
  
  <pre><code>Exception _tkinter.TclError: 'invalid command name ".47045488"' in &lt;bound method
  RootJoint.__del__ of &lt;skeleton.RootJoint object at 0x0000000002CDDBA8&gt;&gt; ignored
  </code></pre>
  
  <p>And here is the relevant part from <code>RootJoint</code>:</p>
  
  <pre><code>def __init__(self, canvas):
      self.parent = None
      self.angle = 0.0
      self.distance = 0.0
  
      topleft = 0 - Joint.SQUARE_HALF_SIDE, 0 + Joint.SQUARE_HALF_SIDE
      bottomright = 0 + Joint.SQUARE_HALF_SIDE, 0 - Joint.SQUARE_HALF_SIDE
  
      self._joint = canvas.create_rectangle(*(topleft + bottomright))
      canvas.itemconfig(self._joint, fill=RootJoint.COLOR_NORMAL)
  
      self.canvas = canvas
  
  def __del__(self):
      self.canvas.delete(self._joint)
  </code></pre>
  
  <p>And this is where the canvas and root joint are created:</p>
  
  <pre><code>def main():
      root = tk.Tk()
      root.geometry('640x480')
  
      canvas = tk.Canvas(root)
      canvas.pack(fill=tk.BOTH, expand=True)
  
      rootjoint = skeleton.RootJoint(canvas)
  
      root.mainloop()
  </code></pre>
  
  <p>Why is this error appearing and how can I fix it?</p>