Create test_app.py
Browse files- test_app.py +31 -0
test_app.py
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import streamlit as st
|
2 |
+
|
3 |
+
st.title("MoviePy Import Test")
|
4 |
+
|
5 |
+
try:
|
6 |
+
import moviepy.editor
|
7 |
+
st.success("Successfully imported moviepy.editor!")
|
8 |
+
st.write(f"MoviePy version (if accessible): {getattr(moviepy, '__version__', 'N/A')}")
|
9 |
+
|
10 |
+
# You can add a simple moviepy operation here if the import works
|
11 |
+
# from moviepy.editor import TextClip
|
12 |
+
# try:
|
13 |
+
# clip = TextClip("Hello", fontsize=70, color='white')
|
14 |
+
# st.write("Created a TextClip object.")
|
15 |
+
# except Exception as e_clip:
|
16 |
+
# st.error(f"Error creating TextClip: {e_clip}")
|
17 |
+
|
18 |
+
except ModuleNotFoundError as e_mod:
|
19 |
+
st.error(f"ModuleNotFoundError: {e_mod}")
|
20 |
+
st.error("moviepy.editor could not be imported.")
|
21 |
+
except Exception as e:
|
22 |
+
st.error(f"An unexpected error occurred during import: {e}")
|
23 |
+
|
24 |
+
st.subheader("Installed Packages (pip list):")
|
25 |
+
import subprocess
|
26 |
+
import sys
|
27 |
+
try:
|
28 |
+
result = subprocess.run([sys.executable, "-m", "pip", "list"], capture_output=True, text=True, check=True)
|
29 |
+
st.code(result.stdout)
|
30 |
+
except Exception as e_pip:
|
31 |
+
st.error(f"Error running pip list: {e_pip}")
|