Spaces:
Sleeping
Sleeping
update
Browse files
app.py
CHANGED
|
@@ -67,11 +67,17 @@ try:
|
|
| 67 |
with zipfile.ZipFile(zip_file_path, "r") as zip_ref:
|
| 68 |
zip_ref.extractall("./")
|
| 69 |
print("Extraction successful.")
|
|
|
|
| 70 |
print("Extracted files:", os.listdir("./"))
|
|
|
|
|
|
|
|
|
|
|
|
|
| 71 |
except Exception as e:
|
| 72 |
-
print(f"
|
|
|
|
|
|
|
| 73 |
|
| 74 |
-
|
| 75 |
|
| 76 |
NUMBER_OF_IMAGES = 30
|
| 77 |
intro_screen = Image.open("./images/intro.jpg")
|
|
|
|
| 67 |
with zipfile.ZipFile(zip_file_path, "r") as zip_ref:
|
| 68 |
zip_ref.extractall("./")
|
| 69 |
print("Extraction successful.")
|
| 70 |
+
# List the contents of the directory to which you've extracted the files
|
| 71 |
print("Extracted files:", os.listdir("./"))
|
| 72 |
+
except zipfile.BadZipFile:
|
| 73 |
+
print("Failed to extract: The zip file is corrupt.")
|
| 74 |
+
except FileNotFoundError:
|
| 75 |
+
print("Failed to extract: The zip file does not exist.")
|
| 76 |
except Exception as e:
|
| 77 |
+
print(f"An error occurred: {e}")
|
| 78 |
+
|
| 79 |
+
print("Contents of the directory:", os.listdir("./"))
|
| 80 |
|
|
|
|
| 81 |
|
| 82 |
NUMBER_OF_IMAGES = 30
|
| 83 |
intro_screen = Image.open("./images/intro.jpg")
|