Skip to content
Snippets Groups Projects
Commit 7b1a3df7 authored by Ruben Young On's avatar Ruben Young On
Browse files

Removed unused import. Errors in processing PDF pages now also display a traceback.

parent 27ff7f5b
No related branches found
No related tags found
1 merge request!17Add pregrading
Pipeline #17932 passed
"""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
......
......@@ -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}")
......
  • Contributor

    This is only useful for developers, but not in production.

0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment