Skip to content

Commit

Permalink
fix: Windows permission error on ingest service tmp files (#1280)
Browse files Browse the repository at this point in the history
  • Loading branch information
FrangSierra committed Nov 20, 2023
1 parent a09cd7a commit f1cbff0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions private_gpt/server/ingest/ingest_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ def ingest(self, file_name: str, file_data: AnyStr | Path) -> list[IngestedDoc]:
path_to_tmp.write_text(str(file_data))
documents = reader.load_data(path_to_tmp)
finally:
tmp.close()
path_to_tmp.unlink()
logger.info(
"Transformed file=%s into count=%s documents", file_name, len(documents)
Expand Down

0 comments on commit f1cbff0

Please sign in to comment.