Unstructured-IO/unstructured-api

UnknownModelException: Unknown model type: ____

sentry-io opened this issue · 0 comments

This is another 500 error that just needs to be caught and turned into a 400.

UnknownModelException: Unknown model type: detectron2onnx
(32 additional frame(s) were not displayed)
...
  File "/home/notebook-user/unstructured/unstructured/utils.py", line 214, in wrapper
    return func(*args, **kwargs)
  File "/home/notebook-user/unstructured/unstructured/partition/pdf_image/pdf.py", line 308, in _partition_pdf_or_image_local
    inferred_document_layout = process_data_with_model(
  File "unstructured_inference/inference/layout.py", line 365, in process_data_with_model
    layout = process_file_with_model(
  File "unstructured_inference/inference/layout.py", line 386, in process_file_with_model
    model = get_model(model_name, **kwargs)
  File "unstructured_inference/models/base.py", line 71, in get_model
    raise UnknownModelException(f"Unknown model type: {model_name}")