If you try to open a file that is not a ZIP file, the exception zipfile.BadZipFile is raised.
zipfile.BadZipFile
In Python 2.7, this was spelled zipfile.BadZipfile, and this old name is retained alongside the new one in Python 3.2+
zipfile.BadZipfile