title: Tkinter error messages - redrawing buttons
body: <p>I write chess on Python3, use Tkinter. I have a problem with bot-mode. Player correctly play: click on buttons and figures move. After player's turn bot should play.</p>
  
  <pre><code>def main():
      start_position()
      root.mainloop()
      while king_alive:
          global bot_turn
          if bot_turn:
              cells = l.bot_move(log_field)
              replace(cells[0], cells[1])
              bot_turn = False
  </code></pre>
  
  <p>this is function replace() which change condition of cells on the field</p>
  
  <pre><code>def replace(first_cell, second_cell):
      if second_cell.figure.type != 'nofig':
          delete_fig(second_cell.figure)
      first_cell.clicked = False
      second_cell.clicked = False
      second_cell.fig_name = first_cell.fig_name
      second_cell.fig_owner = first_cell.fig_owner
      second_cell.figure = second_cell.get_figure()
      first_cell.figure = l.NoFigure(first_cell.x, first_cell.y, "")
      first_cell.fig_name = ""
      first_cell.fig_owner = ""
      field[second_cell.x][second_cell.y].configure(fg=second_cell.fig_owner, text=second_cell.fig_name)
      field[first_cell.x][first_cell.y].configure(text="")
   demark_cells()
  </code></pre>
  
  <p>people can easily play and move figures, but bot can't do it, however he use the same functions of movement - replace() (input for method replace() are correct. I can't understand the traceback</p>
  
  <pre><code>Traceback (most recent call last):
    File "C:/Users/Даша/Desktop/python/task chess/graphics.py", line 176, in &lt;module&gt;
      main()
    File "C:/Users/Даша/Desktop/python/task chess/graphics.py", line 171, in main
      replace(cells[0], cells[1])
    File "C:/Users/Даша/Desktop/python/task chess/graphics.py", line 138, in replace
      field[second_cell.x][second_cell.y]['fg'] = second_cell.fig_owner
    File "C:\Python34\lib\tkinter\__init__.py", line 1275, in __setitem__
      self.configure({key: value})
    File "C:\Python34\lib\tkinter\__init__.py", line 1268, in configure
      return self._configure('configure', cnf, kw)
    File "C:\Python34\lib\tkinter\__init__.py", line 1259, in _configure
      self.tk.call(_flatten((self._w, cmd)) + self._options(cnf))
    _tkinter.TclError: invalid command name ".36689776"
  </code></pre>
  
  <p>how to solve the problem?
  P.S. log_field is matrix of every cell conditions
  field is matrix of tkinter buttons</p>