Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to accept invalidfileexception in python

from tkinter import messagebox
from tkinter import filedialog

from openpyxl.utils.exceptions import InvalidFileException
...

    def browseXLL(self,event):
        try:
            file = filedialog.askopenfilename()
        except InvalidFileException:

            self.window.destroy()
            self.__init__()
 
PREVIOUS NEXT
Tagged: #accept #invalidfileexception #python
ADD COMMENT
Topic
Name
9+1 =