Answers for "how to accept invalidfileexception in python"

0

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__()
Posted by: Guest on August-31-2021

Code answers related to "how to accept invalidfileexception in python"

Python Answers by Framework

Browse Popular Code Answers by Language