Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -14,9 +14,18 @@ from streamlit_sortables import sort_items
|
|
| 14 |
import subprocess
|
| 15 |
from tqdm import tqdm
|
| 16 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
|
| 18 |
try:
|
| 19 |
-
output = subprocess.check_output(["pdfinfo", "-version"])
|
| 20 |
print(f"Poppler version: {output.decode('utf-8')}")
|
| 21 |
except FileNotFoundError:
|
| 22 |
print("Poppler (pdfinfo) is not installed or not found in PATH.")
|
|
|
|
| 14 |
import subprocess
|
| 15 |
from tqdm import tqdm
|
| 16 |
|
| 17 |
+
# Check if /usr/bin/pdfinfo exists
|
| 18 |
+
if os.path.exists("/usr/bin/pdfinfo"):
|
| 19 |
+
print("pdfinfo exists at /usr/bin/pdfinfo")
|
| 20 |
+
# Check the file permissions
|
| 21 |
+
permissions = os.stat("/usr/bin/pdfinfo").st_mode
|
| 22 |
+
print(f"File permissions: {oct(permissions)}")
|
| 23 |
+
else:
|
| 24 |
+
print("pdfinfo does not exist at /usr/bin/pdfinfo")
|
| 25 |
+
|
| 26 |
|
| 27 |
try:
|
| 28 |
+
output = subprocess.check_output(["/usr/bin/pdfinfo", "-version"])
|
| 29 |
print(f"Poppler version: {output.decode('utf-8')}")
|
| 30 |
except FileNotFoundError:
|
| 31 |
print("Poppler (pdfinfo) is not installed or not found in PATH.")
|