title: error in my speachto text python programm
body: <p>every time i start my programm it woks perfectly fine but at a point in the programm i get this error</p>
  <pre><code>Exception in Tkinter callback
  Traceback (most recent call last):
    File &quot;C:\Program Files\Python39\lib\tkinter\__init__.py&quot;, line 1892, in __call__
      return self.func(*args)
    File &quot;c:\Users\mikan\OneDrive\Desktop\python\Erstes programm\firtrightprogramme.pyw&quot;, line 34, in test1
      goon()
    File &quot;c:\Users\mikan\OneDrive\Desktop\python\Erstes programm\firtrightprogramme.pyw&quot;, line 47, in goon
      ifclause()
    File &quot;c:\Users\mikan\OneDrive\Desktop\python\Erstes programm\firtrightprogramme.pyw&quot;, line 52, in ifclause
      Moin()
    File &quot;c:\Users\mikan\OneDrive\Desktop\python\Erstes programm\firtrightprogramme.pyw&quot;, line 41, in Moin
      recording.pack()
    File &quot;C:\Program Files\Python39\lib\tkinter\__init__.py&quot;, line 2396, in pack_configure
      self.tk.call(
  _tkinter.TclError: bad window path name &quot;.!button2&quot;
  </code></pre>
  <p>and i cant fix it
  here is the code pls help</p>
  <pre><code>from tkinter import *
  import time
  from threading import Timer
  import os
  
  lt = time.localtime()
  
  
  
  def buttonaction():
      global buttonaction
      timesay.destroy()
      datumsay.destroy()
      hellosay.destroy()
      tell.destroy()
      exit.destroy()
      start1.destroy()
      info.destroy()
      Setings.destroy()
      start.destroy()
      recording.pack()
  
  
  
  def test2():
       Button(fenster, text=&quot;aufnahme&quot;, command=test1).pack()
      
  
  def test1():
      global text
      import program2
      program2
      text = program2.text
      goon()
      
  
  def seting():
      tell.pack()
  
  def Moin():
      recording.pack()
  
  def goon():
      #print(f&quot;{text}&quot;)
      recording.destroy()
      #print(f&quot;{text}&quot;)
  
      if text == (&quot;hallo&quot;):
          #here i get the error
          Moin()
          
  
      elif text == (&quot;stop&quot;):
          quit
  
      elif text == (&quot;zeit&quot;):
          #here i get the error
          print(&quot;here comes thet time&quot;)
          timesay
          datumsay
  
      elif text == (&quot;hello from the other side&quot;):
          print(&quot;haha sher lustig&quot;)
  
      else:
          Label(fenster, text=&quot;What did you say&quot;)
  
      
      buttonaction()
  
      
  
  fenster = Tk()
  
  fenster.title(&quot;Javis&quot;)
  
  start1 = Button(fenster, text=&quot;Start&quot;, command=buttonaction)
  recording = Button(fenster, text=&quot;aufnahme&quot;, command=test1)
  start = Label(fenster, text=&quot;Press to start&quot;)
  Setings = Button(fenster, text=&quot;Setings&quot;, command=seting)
  exit = Button(fenster, text=&quot;Quit&quot;, command=fenster.quit)
  moinmeister = Label(fenster, text=&quot;hallo was kann ich für dich tuen&quot;)
  
  
  info = Label(fenster, text=&quot;Press to quit&quot;)
  tell = Label(fenster, text=&quot;there are no setings ;)&quot;)
  hellosay = Label(fenster, text=&quot;Hello what can i do for you today&quot;)
  datumsay = Label(fenster, text=&quot;Datum: {0:02d}.{1:02d}.{2:4d}&quot;.format(lt[2], lt[1], lt[0]))
  timesay = Label(fenster, text=&quot;Uhrzeit: {0:02}:{1:02d}:{2:02d}&quot;.format(lt[3], lt[4], lt[5]))
  
  
  start.pack()
  start1.pack()
  info.pack()
  exit.pack()
  Setings.pack()
  fenster.mainloop()
  </code></pre>
  <p>if anyone can help me it would be grate</p>
  <p>here some random thinks because stackoverflow think tjere is to much code and not enaughth text</p>
  <p>hello</p>
  <p>hello</p>
  <p>hello</p>
  <p>hello</p>
  <p>hello</p>
  <p>hello</p>
  <p>hello</p>
  <p>hello</p>
  <p>hello</p>
  <p>hello</p>
  <p>hello</p>
  <p>hello</p>
  <p>hello</p>
  <p>hello</p>
  <p>hello</p>
  <p>hello</p>
  <p>hello</p>
  <p>hello</p>
  <p>hello</p>
  <p>hello</p>
  <p>hello</p>
  <p>hello</p>
  <p>hello</p>
  <p>hello</p>
  <p>hello</p>
  <p>hello</p>
  <p>hello</p>
  <p>hello</p>
  <p>hello</p>
  <p>hello</p>
  <p>hello</p>
  <p>hello</p>
  <p>hello</p>
  <p>hello</p>
  <p>hello</p>
  <p>hello</p>
  <p>hello</p>