Skip to content

Commit

Permalink
Update OrtInferSession tip when meets error.
Browse files Browse the repository at this point in the history
  • Loading branch information
SWHL committed Jun 30, 2023
1 parent 11c725d commit 02278c2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion python/rapidocr_onnxruntime/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# @Author: SWHL
# @Contact: liekkaskono@163.com
import argparse
import traceback
import warnings
from io import BytesIO
from pathlib import Path
Expand Down Expand Up @@ -71,7 +72,8 @@ def __call__(self, input_content: np.ndarray) -> np.ndarray:
try:
return self.session.run(self.get_output_names(), input_dict)
except Exception as e:
raise ONNXRuntimeError("ONNXRuntime inference failed.") from e
error_info = traceback.format_exc()
raise ONNXRuntimeError(error_info) from e

def get_input_names(
self,
Expand Down

0 comments on commit 02278c2

Please sign in to comment.