Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

上传入pdf 报错 #7

Open
kcxg opened this issue Mar 31, 2023 · 0 comments
Open

上传入pdf 报错 #7

kcxg opened this issue Mar 31, 2023 · 0 comments

Comments

@kcxg
Copy link

kcxg commented Mar 31, 2023

127.0.0.1 - - [31/Mar/2023 11:57:23] "POST /process_pdf HTTP/1.1" 500 -
INFO:werkzeug:127.0.0.1 - - [31/Mar/2023 11:57:23] "POST /process_pdf HTTP/1.1" 500 -
Traceback (most recent call last):
File "D:\huice\chatpdflike\venv\lib\site-packages\pandas\core\indexes\base.py", line 3802, in get_loc
return self._engine.get_loc(casted_key)
File "pandas_libs\index.pyx", line 138, in pandas._libs.index.IndexEngine.get_loc
File "pandas_libs\index.pyx", line 165, in pandas._libs.index.IndexEngine.get_loc
File "pandas_libs\hashtable_class_helper.pxi", line 5745, in pandas._libs.hashtable.PyObjectHashTable.get_item
File "pandas_libs\hashtable_class_helper.pxi", line 5753, in pandas._libs.hashtable.PyObjectHashTable.get_item
KeyError: 'text'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "D:\huice\chatpdflike\venv\lib\site-packages\flask\app.py", line 2551, in call
return self.wsgi_app(environ, start_response)
File "D:\huice\chatpdflike\venv\lib\site-packages\flask\app.py", line 2531, in wsgi_app
File "D:\huice\chatpdflike\venv\lib\site-packages\flask\app.py", line 1823, in full_dispatch_request
rv = self.dispatch_request()
File "D:\huice\chatpdflike\venv\lib\site-packages\flask\app.py", line 1799, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
File "D:\huice\chatpdflike\run.py", line 24, in process_pdf
df = chatbot.paper_df(paper_text)
File "D:\huice\chatpdflike\generate_embedding.py", line 75, in paper_df
df['length'] = df['text'].apply(lambda x: len(x))
File "D:\huice\chatpdflike\venv\lib\site-packages\pandas\core\frame.py", line 3807, in getitem
indexer = self.columns.get_loc(key)
File "D:\huice\chatpdflike\venv\lib\site-packages\pandas\core\indexes\base.py", line 3804, in get_loc
raise KeyError(key) from err
KeyError: 'text'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant