title: Showerror doesnt't want to appear, but the code seems no error
body: <p>I created an open file dialog app with Python with tkinter library:</p>
  <pre><code>class MainForm(Frame):
      def __init__(self,parent):
          Frame.__init__(self,parent)
          self.parent=parent
          self.InitUI()
  
      def InitUI(self):
          #===============#
          self.frame1=Frame()
          self.frame1.pack(fill=X)
          
          self.lbl=Label(self.frame1,text=&quot;File Name&quot;)
          self.lbl.pack(side=LEFT,padx=5,pady=5)
         
          #===============#
          self.frame2=Frame()
          self.frame2.pack(fill=BOTH,expand=True)
          
          self.text1_Text=StringVar()
          self.text1=Entry(self.frame2,state=DISABLED,textvariable=self.text1_Text)
          self.text1.pack(side=LEFT,anchor=NW,fill=X,expand=True,padx=5,pady=5)
          
          #===============#
          
          self.frame3=Frame()
          self.frame3.pack(fill=BOTH,expand=True)
             
          self.actBtn1=Button(self.frame3,text=&quot;Choose CSV File&quot;,command=lambda:[self.open_dialog(),self.open_csv_dataframe()])
          self.actBtn1.pack(side=LEFT,padx=5,pady=5)
          
          self.actBtn2=Button(self.frame3,text=&quot;Open&quot;,state=DISABLED,command=self.tes_dataframe)
          self.actBtn2.pack(side=RIGHT,padx=5,pady=5)
          
          #===============#
          self.frame4=Frame()
          self.frame4.pack(side=LEFT,anchor=N)
          
          self.lbl2=Label(self.frame4,text=&quot;Information&quot;)
          self.lbl2.pack(side=LEFT,padx=5,pady=5)     
          
          self.helpBtn=Button(self.frame4,text=&quot;How To Use The Program&quot;)
          self.helpBtn.pack(side=LEFT,padx=5,pady=5,anchor=N)
          
          self.aboutBtn=Button(self.frame4,text=&quot;About Program&quot;)
          self.aboutBtn.pack(side=RIGHT,padx=5,pady=5,anchor=N)
          #===============#
  
      def open_dialog(self):
          global fileName
          try:
              self.fileName=filedialog.askopenfilename(initialdir=&quot;/&quot;,filetypes=((&quot;Comma-separated values&quot;,&quot;*.csv&quot;),))
              self.text1_Text.set(self.fileName)     
          except FileNotFoundError:
              showerror(&quot;Error&quot;,&quot;The file is not selected yet&quot;)
  
      def open_csv_dataframe(self):
          if(self.actBtn2['state']==NORMAL):
              self.actBtn2['state']=DISABLED
          else:
              self.actBtn2['state']=NORMAL
  
      def tes_dataframe(self):
          global df
          data=pd.read_csv(self.text1.get(),sep=&quot;,&quot;)
          df=pd.DataFrame(data)
          root.destroy()      
      
  def on_close():
      close = askokcancel(&quot;Close&quot;, &quot;Do you want to exit?&quot;)
      if close:
          root.destroy()
          sys.exit(1)
       
  
  if __name__=='__main__':
      root=Tk()
      app=MainForm(root)
      root.geometry(&quot;400x130+130+130&quot;)
      root.resizable(False,False)
      root.title(&quot;A Quite Complex File Dialog Form&quot;)
      root.protocol(&quot;WM_DELETE_WINDOW&quot;,  on_close)
      root.mainloop()
  
       
  </code></pre>
  <p>The code that i wrote seems no error, but when i try execute this part:</p>
  <pre><code>    def open_dialog(self):
          global fileName
          try:
              self.fileName=filedialog.askopenfilename(initialdir=&quot;/&quot;,filetypes=((&quot;Comma-separated values&quot;,&quot;*.csv&quot;),))
              self.text1_Text.set(self.fileName)     
          except FileNotFoundError:
              showerror(&quot;Error&quot;,&quot;The file is not selected yet&quot;)
  </code></pre>
  <p>I try to not choose a csv file, but no error message showed. It should be appeared like this:</p>
  <p><a href="https://i.stack.imgur.com/6Lj5U.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6Lj5U.png" alt="An error message should be appeared like this" /></a></p>
  <p>But it didn't appeared,</p>
  <p>How to make it appeared, i tried many workaround but it came no result.</p>