talkingwallace / ChatGPT-Paper-Reader

This repo offers a simple interface that helps you to read&summerize research papers in pdf format. You can ask some questions after reading. This interface is developed based on openai API and using GPT-3.5-turbo model.
730 stars 109 forks source link

PyPDF2.errors.EmptyFileError: Cannot read an empty file #7

Open zwy923 opened 1 year ago

zwy923 commented 1 year ago

Traceback (most recent call last): File "D:\Anaconda3\lib\site-packages\gradio\routes.py", line 393, in run_predict output = await app.get_blocks().process_api( File "D:\Anaconda3\lib\site-packages\gradio\blocks.py", line 1069, in process_api result = await self.call_function( File "D:\Anaconda3\lib\site-packages\gradio\blocks.py", line 878, in call_function prediction = await anyio.to_thread.run_sync( File "D:\Anaconda3\lib\site-packages\anyio\to_thread.py", line 28, in run_sync return await get_asynclib().run_sync_in_worker_thread(func, args, cancellable=cancellable, File "D:\Anaconda3\lib\site-packages\anyio_backends_asyncio.py", line 818, in run_sync_in_worker_thread return await future File "D:\Anaconda3\lib\site-packages\anyio_backends_asyncio.py", line 754, in run result = context.run(func, args) File "c:\Users\Administrator\Desktop\Paper-Reader\gui.py", line 14, in analyse return self.session.read_pdf_and_summarize(pdf_file) File "c:\Users\Administrator\Desktop\Paper-Reader\gpt_reader\pdf_reader.py", line 100, in read_pdf_and_summarize pdf_reader = PdfReader(pdf_path) File "D:\Anaconda3\lib\site-packages\PyPDF2_reader.py", line 319, in init self.read(stream) File "D:\Anaconda3\lib\site-packages\PyPDF2_reader.py", line 1414, in read self._basic_validation(stream) File "D:\Anaconda3\lib\site-packages\PyPDF2_reader.py", line 1455, in _basic_validation
raise EmptyFileError("Cannot read an empty file")

Alpaca4610 commented 1 year ago

https://github.com/talkingwallace/ChatGPT-Paper-Reader/issues/3

pengzha0 commented 1 year ago

同上

Bearbear006 commented 1 year ago

same

Yikai-Cao commented 1 year ago

same

pengzha0 commented 1 year ago

别same了,#3 已经解决了