testdeep123 commited on
Commit
80a7bd3
·
verified ·
1 Parent(s): 11356bb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -49
app.py CHANGED
@@ -1,50 +1,3 @@
1
- print("--- MoviePy Installation Check ---")
2
 
3
- try:
4
- # 1. Try to import the main library
5
- import moviepy
6
- print(f"[SUCCESS] MoviePy core library imported successfully.")
7
-
8
- try:
9
- # Print version if possible
10
- print(f" Version detected: {moviepy.__version__}")
11
- except AttributeError:
12
- print(" Could not determine MoviePy version (older version?).")
13
-
14
- # 2. Try to import a core component (often fails if dependencies are missing)
15
- try:
16
- from moviepy.editor import VideoFileClip, TextClip
17
- print(f"[SUCCESS] MoviePy editor components (VideoFileClip, TextClip) imported.")
18
-
19
- # 3. Perform a very simple functional test (create a TextClip object)
20
- # This doesn't require external files or ImageMagick *just* to create the object.
21
- # Rendering it *would* often require ImageMagick.
22
- try:
23
- print("\n--- Running simple functional test (creating TextClip) ---")
24
- test_clip = TextClip("Test OK", fontsize=30, color='white')
25
- # Check if an object was created and has basic attributes
26
- if hasattr(test_clip, 'duration') and hasattr(test_clip, 'size'):
27
- print(f"[SUCCESS] Basic TextClip object created successfully.")
28
- print("\nMoviePy appears to be installed and minimally functional.")
29
- else:
30
- print("[WARNING] TextClip object created but seems incomplete. Check dependencies.")
31
-
32
- except Exception as test_e:
33
- print(f"[ERROR] Failed during simple functional test: {test_e}")
34
- print(" MoviePy might be installed, but a core function failed.")
35
- print(" This could indicate missing dependencies (like ImageMagick for TextClip rendering, though not strictly needed for object creation).")
36
-
37
- except ImportError as comp_e:
38
- print(f"[ERROR] Failed to import moviepy.editor components: {comp_e}")
39
- print(" MoviePy might be partially installed or core dependencies are missing.")
40
-
41
- except ImportError:
42
- print("[ERROR] Failed to import the 'moviepy' library.")
43
- print(" MoviePy is likely NOT installed in this Python environment.")
44
- print("\n To install it, try running:")
45
- print(" pip install moviepy")
46
- except Exception as e:
47
- print(f"[ERROR] An unexpected error occurred: {e}")
48
- print(" There might be a problem with your Python environment or the MoviePy installation.")
49
-
50
- print("\n--- Check complete ---")
 
1
+ import moviepy.editor as mp
2
 
3
+ print("✅ MoviePy editor imported successfully!")