errantanomie commited on
Commit
708eeaa
·
verified ·
1 Parent(s): c99df9a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -25,10 +25,12 @@ else:
25
 
26
 
27
  try:
28
- output = subprocess.check_output(["/usr/bin/pdfinfo", "-version"]) #Corrected argument passing
29
- print(f"Poppler version: {output.decode('utf-8')}")
30
  except FileNotFoundError:
31
  print("Poppler (pdfinfo) is not installed or not found in PATH.")
 
 
32
 
33
 
34
  # Load Google Cloud Vision credentials from secret
 
25
 
26
 
27
  try:
28
+ result = subprocess.run(["/usr/bin/pdfinfo", "-version"], capture_output=True, text=True, check=True)
29
+ print(f"Poppler version: {result.stdout}")
30
  except FileNotFoundError:
31
  print("Poppler (pdfinfo) is not installed or not found in PATH.")
32
+ except subprocess.CalledProcessError as e:
33
+ print(f"Poppler (pdfinfo) error: {e.stderr}")
34
 
35
 
36
  # Load Google Cloud Vision credentials from secret