Unstructured-IO / unstructured-api

Apache License 2.0
489 stars 102 forks source link

UnknownModelException: Unknown model type: ____ #330

Closed sentry-io[bot] closed 8 months ago

sentry-io[bot] commented 8 months ago

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}")