"AttributeError: 'UploadedFile' object has no attribute 'split'"

I am currently working on Table transformer and structure recognition

streamlit app starts fine in " Local URL: http://localhost:8501 "

After uploading the image I got this error message “AttributeError: ‘UploadedFile’ object has no attribute ‘split’”

How to resolve this error

Code snippet:

        image = Image.open(image_path).convert("RGB")
        model, probas, bboxes_scaled = table_detector(

        if bboxes_scaled.nelement() == 0:
            print('No table found in the pdf-page image' +
            return ''

I am using this code Code Link.

Do not call split() on an UploadedFile object.

1 Like