KeenWoo commited on
Commit
be0757e
·
verified ·
1 Parent(s): fb88893

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +24 -0
app.py CHANGED
@@ -9,6 +9,30 @@ from pytube import YouTube
9
  from pathlib import Path # <-- Add this import at the top of your file with the other imports
10
  import re
11
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12
 
13
  # --- Agent Imports & Safe Fallbacks ---
14
  try:
 
9
  from pathlib import Path # <-- Add this import at the top of your file with the other imports
10
  import re
11
 
12
+ # --- START: Filesystem Write Test ---
13
+ import os
14
+ import datetime
15
+
16
+ TEST_DIR = "test_directory"
17
+ try:
18
+ print("--- RUNNING FILESYSTEM WRITE TEST ---")
19
+ if not os.path.exists(TEST_DIR):
20
+ print(f"Attempting to create '{TEST_DIR}'...")
21
+ os.makedirs(TEST_DIR)
22
+ print(f"'{TEST_DIR}' created successfully.")
23
+ else:
24
+ print(f"'{TEST_DIR}' already exists.")
25
+
26
+ with open(os.path.join(TEST_DIR, "test_file.txt"), "w") as f:
27
+ f.write(f"File write successful at: {datetime.datetime.now()}")
28
+ print("Test file written successfully.")
29
+ print("--- FILESYSTEM WRITE TEST PASSED ---")
30
+
31
+ except Exception as e:
32
+ print(f"--- !!! FILESYSTEM WRITE TEST FAILED !!! ---")
33
+ print(f"Error: {e}")
34
+ # --- END: Filesystem Write Test ---
35
+
36
 
37
  # --- Agent Imports & Safe Fallbacks ---
38
  try: