We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3cbc4dd commit 0e493baCopy full SHA for 0e493ba
paperqa/agents/search.py
@@ -258,9 +258,15 @@ async def index_files(self) -> dict[str, str]:
258
if await file_index_path.exists():
259
async with await anyio.open_file(file_index_path, "rb") as f:
260
content = await f.read()
261
- self._index_files = pickle.loads( # noqa: S301
262
- zlib.decompress(content)
263
- )
+ try:
+ self._index_files = pickle.loads( # noqa: S301
+ zlib.decompress(content)
264
+ )
265
+ except Exception:
266
+ logger.exception(
267
+ f"Failed to load index file {file_index_path}."
268
269
+ raise
270
return self._index_files
271
272
@staticmethod
0 commit comments