Skip to content

when convert a pdf file error #1141

@FreeGodCode

Description

@FreeGodCode

File ~/miniconda3/lib/python3.12/site-packages/markitdown/_markitdown.py:1719, in MarkItDown._convert(self, local_path, extensions, **kwargs)
1716 except Exception:
1717 error_trace = ("\n\n" + traceback.format_exc()).strip()
-> 1719 if res is not None:
1720 # Normalize the content
1721 res.text_content = "\n".join(
1722 [line.rstrip() for line in re.split(r"\r?\n", res.text_content)]
1723 )
1724 res.text_content = re.sub(r"\n{3,}", "\n\n", res.text_content)

UnboundLocalError: cannot access local variable 'res' where it is not associated with a value

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