Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
sourabhdesai committed Jun 29, 2024
1 parent 4ccff23 commit d80f94e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions llama_parse/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,8 @@ async def _aload_data(
return docs

except Exception as e:
print(f"Error while parsing the file {file_path}:", e)
file_repr = file_path if isinstance(file_path, str) else "<bytes/buffer>"
print(f"Error while parsing the file '{file_repr}':", e)
if self.ignore_errors:
return []
else:
Expand Down Expand Up @@ -358,7 +359,8 @@ async def _aget_json(
return [result]

except Exception as e:
print(f"Error while parsing the file {file_path}:", e)
file_repr = file_path if isinstance(file_path, str) else "<bytes/buffer>"
print(f"Error while parsing the file '{file_repr}':", e)
if self.ignore_errors:
return []
else:
Expand Down

0 comments on commit d80f94e

Please sign in to comment.