Skip to content

feat-request: Document Schema filepath property data type #645

@eddiedozier

Description

@eddiedozier

Hi, I'm currently facing a pydantic error, https://errors.pydantic.dev/2.11/v/string_unicode, when I pass bytes to the TableConverter filepath argument. After tracing the source of the error to /schema/document.py , I was able to resolve it by converting the filepath type of str to Union[str | bytes].

class Document(BaseModel):
    filepath: Union[str | bytes]

The use case for this change is utilizing Marker in a GPU serverless function that will take a PDF file upload from users that will go downstream to the serverless function where Marker will process the file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions