From 7b1a3df7c6284c873970f16318472d925245a0fe Mon Sep 17 00:00:00 2001
From: Ruben Young On <r.d.youngon@student.tudelft.nl>
Date: Fri, 24 May 2019 20:47:31 +0200
Subject: [PATCH] Removed unused import. Errors in processing PDF pages now
 also display a traceback.

---
 zesje/images.py | 2 --
 zesje/scans.py  | 4 ++--
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/zesje/images.py b/zesje/images.py
index da3aaa84..df61de90 100644
--- a/zesje/images.py
+++ b/zesje/images.py
@@ -1,7 +1,6 @@
 """Utilities for dealing with images"""
 
 import numpy as np
-import warnings
 
 from operator import sub, add
 
@@ -48,7 +47,6 @@ def fix_corner_markers(corner_keypoints, shape):
     ----------
     corner_keypoints: list of corner marker locations as tuples
     dpi: the dpi of the image in which the corner markers are from
-
     image_format: either A4 or US letter
 
     Returns
diff --git a/zesje/scans.py b/zesje/scans.py
index 33cd53bd..6ba14b9a 100644
--- a/zesje/scans.py
+++ b/zesje/scans.py
@@ -88,8 +88,8 @@ def _process_pdf(scan_id, app_config):
                 if not success:
                     print(description)
                     failures.append(page)
-            except Exception:
-                report_error(f'Error processing page {traceback.format_exc()}')
+            except Exception as e:
+                report_error(f'Error processing page {e}.\nTraceback:\n{traceback.format_exc()}')
                 raise
     except Exception as e:
         report_error(f"Failed to read pdf: {e}")
-- 
GitLab