Skip to content

Commit

Permalink
Serialized mm parser exception
Browse files Browse the repository at this point in the history
  • Loading branch information
S1LV3RJ1NX committed Jun 27, 2024
1 parent bc68771 commit 4449748
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions backend/modules/parsers/multimodalparser.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import asyncio
import base64
import io
import json
import os
import sys
import traceback
from itertools import islice
from typing import Optional

Expand Down Expand Up @@ -182,7 +183,9 @@ async def get_chunks(

pages[page_number] = image_base64
except Exception as e:
logger.error(f"Error in page: {page_number} - {e}")
exc_info = sys.exc_info()
logger.error("".join(traceback.format_exception(*exc_info)))
logger.error(f"Error in page: {page_number}")
continue

# make parallel requests to VLM for all pages
Expand Down

0 comments on commit 4449748

Please sign in to comment.