Comments (4)
程序报错信息贴一下
from chatpdflike.
程序报错信息贴一下
- Serving Flask app "run" (lazy loading)
- Environment: production
WARNING: This is a development server. Do not use it in a production deployment.
Use a production WSGI server instead. - Debug mode: on
- Restarting with watchdog (windowsapi)
- Debugger is active!
- Debugger PIN: 101-682-997
- Running on all addresses.
WARNING: This is a development server. Do not use it in a production deployment. - Running on http://192.168.37.23:8080/ (Press CTRL+C to quit)
192.168.37.23 - - [28/Mar/2023 16:25:31] "GET / HTTP/1.1" 200 -
Processing pdf - Detected change in 'C:\Users\46213\anaconda3\Lib\site-packages\pandas\core\indexes\base.py', reloading
INFO:werkzeug: * Detected change in 'C:\Users\46213\anaconda3\Lib\site-packages\pandas\core\indexes\base.py', reloading - Detected change in 'C:\Users\46213\anaconda3\Lib\site-packages\pandas\core\frame.py', reloading
INFO:werkzeug: * Detected change in 'C:\Users\46213\anaconda3\Lib\site-packages\pandas\core\frame.py', reloading
192.168.37.23 - - [28/Mar/2023 16:25:36] "POST /process_pdf HTTP/1.1" 500 -
INFO:werkzeug:192.168.37.23 - - [28/Mar/2023 16:25:36] "POST /process_pdf HTTP/1.1" 500 -
Traceback (most recent call last):
File "C:\Users\46213\anaconda3\Lib\site-packages\pandas\core\indexes\base.py", line 3080, in get_loc
return self._engine.get_loc(casted_key)
File "pandas_libs\index.pyx", line 70, in pandas._libs.index.IndexEngine.get_loc
File "pandas_libs\index.pyx", line 101, in pandas._libs.index.IndexEngine.get_loc
File "pandas_libs\hashtable_class_helper.pxi", line 4554, in pandas._libs.hashtable.PyObjectHashTable.get_item
File "pandas_libs\hashtable_class_helper.pxi", line 4562, 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 "C:\Users\46213\anaconda3\Lib\site-packages\flask\app.py", line 2464, in call
return self.wsgi_app(environ, start_response)
File "C:\Users\46213\anaconda3\Lib\site-packages\flask\app.py", line 2450, in wsgi_app
response = self.handle_exception(e)
File "C:\Users\46213\anaconda3\Lib\site-packages\flask_cors\extension.py", line 165, in wrapped_function
return cors_after_request(app.make_response(f(*args, **kwargs)))
File "C:\Users\46213\anaconda3\Lib\site-packages\flask\app.py", line 1867, in handle_exception
reraise(exc_type, exc_value, tb)
File "C:\Users\46213\anaconda3\Lib\site-packages\flask_compat.py", line 39, in reraise
raise value
File "C:\Users\46213\anaconda3\Lib\site-packages\flask\app.py", line 2447, in wsgi_app
response = self.full_dispatch_request()
File "C:\Users\46213\anaconda3\Lib\site-packages\flask\app.py", line 1952, in full_dispatch_request
rv = self.handle_user_exception(e)
File "C:\Users\46213\anaconda3\Lib\site-packages\flask_cors\extension.py", line 165, in wrapped_function
return cors_after_request(app.make_response(f(*args, **kwargs)))
File "C:\Users\46213\anaconda3\Lib\site-packages\flask\app.py", line 1821, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "C:\Users\46213\anaconda3\Lib\site-packages\flask_compat.py", line 39, in reraise
raise value
File "C:\Users\46213\anaconda3\Lib\site-packages\flask\app.py", line 1950, in full_dispatch_request
rv = self.dispatch_request()
File "C:\Users\46213\anaconda3\Lib\site-packages\flask\app.py", line 1936, in dispatch_request
return self.view_functionsrule.endpoint
File "C:\Users\46213\Desktop\t5\chatpdflike-main\run.py", line 24, in process_pdf
df = chatbot.paper_df(paper_text)
File "C:\Users\46213\Desktop\t5\chatpdflike-main\generate_embedding.py", line 76, in paper_df
df['length'] = df['text'].apply(lambda x: len(x))
File "C:\Users\46213\anaconda3\Lib\site-packages\pandas\core\frame.py", line 3024, in getitem
indexer = self.columns.get_loc(key)
File "C:\Users\46213\anaconda3\Lib\site-packages\pandas\core\indexes\base.py", line 3082, in get_loc
raise KeyError(key) from err
KeyError: 'text'
- Restarting with watchdog (windowsapi)
- Debugger is active!
- Debugger PIN: 101-682-997
- Running on all addresses.
WARNING: This is a development server. Do not use it in a production deployment. - Running on http://192.168.37.23:8080/ (Press CTRL+C to quit)
192.168.37.23 - - [28/Mar/2023 16:26:13] "POST /reply HTTP/1.1" 500 -
Traceback (most recent call last):
File "C:\Users\46213\anaconda3\Lib\site-packages\flask\app.py", line 2464, in call
return self.wsgi_app(environ, start_response)
File "C:\Users\46213\anaconda3\Lib\site-packages\flask\app.py", line 2450, in wsgi_app
response = self.handle_exception(e)
File "C:\Users\46213\anaconda3\Lib\site-packages\flask_cors\extension.py", line 165, in wrapped_function
return cors_after_request(app.make_response(f(*args, **kwargs)))
File "C:\Users\46213\anaconda3\Lib\site-packages\flask\app.py", line 1867, in handle_exception
reraise(exc_type, exc_value, tb)
File "C:\Users\46213\anaconda3\Lib\site-packages\flask_compat.py", line 39, in reraise
raise value
File "C:\Users\46213\anaconda3\Lib\site-packages\flask\app.py", line 2447, in wsgi_app
response = self.full_dispatch_request()
File "C:\Users\46213\anaconda3\Lib\site-packages\flask\app.py", line 1952, in full_dispatch_request
rv = self.handle_user_exception(e)
File "C:\Users\46213\anaconda3\Lib\site-packages\flask_cors\extension.py", line 165, in wrapped_function
return cors_after_request(app.make_response(f(*args, **kwargs)))
File "C:\Users\46213\anaconda3\Lib\site-packages\flask\app.py", line 1821, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "C:\Users\46213\anaconda3\Lib\site-packages\flask_compat.py", line 39, in reraise
raise value
File "C:\Users\46213\anaconda3\Lib\site-packages\flask\app.py", line 1950, in full_dispatch_request
rv = self.dispatch_request()
File "C:\Users\46213\anaconda3\Lib\site-packages\flask\app.py", line 1936, in dispatch_request
return self.view_functionsrule.endpoint
File "C:\Users\46213\Desktop\t5\chatpdflike-main\run.py", line 48, in reply
prompt = chatbot.create_prompt(df, query)
NameError: name 'df' is not defined
from chatpdflike.
same issue
from chatpdflike.
103.7.29.32 - - [29/Mar/2023 14:29:11] "POST /reply HTTP/1.1" 500 -
INFO:werkzeug:103.7.29.32 - - [29/Mar/2023 14:29:11] "POST /reply HTTP/1.1" 500 -
Traceback (most recent call last):
File "/usr/local/python3/lib/python3.11/site-packages/flask/app.py", line 2548, in call
return self.wsgi_app(environ, start_response)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/python3/lib/python3.11/site-packages/flask/app.py", line 2528, in wsgi_app
response = self.handle_exception(e)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/python3/lib/python3.11/site-packages/flask_cors/extension.py", line 165, in wrapped_function
return cors_after_request(app.make_response(f(*args, **kwargs)))
^^^^^^^^^^^^^^^^^^^^
File "/usr/local/python3/lib/python3.11/site-packages/flask/app.py", line 2525, in wsgi_app
response = self.full_dispatch_request()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/python3/lib/python3.11/site-packages/flask/app.py", line 1822, in full_dispatch_request
rv = self.handle_user_exception(e)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/python3/lib/python3.11/site-packages/flask_cors/extension.py", line 165, in wrapped_function
return cors_after_request(app.make_response(f(*args, **kwargs)))
^^^^^^^^^^^^^^^^^^^^
File "/usr/local/python3/lib/python3.11/site-packages/flask/app.py", line 1820, in full_dispatch_request
rv = self.dispatch_request()
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/python3/lib/python3.11/site-packages/flask/app.py", line 1796, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/chatpdflike/run.py", line 48, in reply
prompt = chatbot.create_prompt(df, query)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/chatpdflike/generate_embedding.py", line 105, in create_prompt
result = self.search_embeddings(df, user_input)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/chatpdflike/generate_embedding.py", line 100, in search_embeddings
sources.append({'Page '+str(results.iloc[i]['page']): results.iloc[i]['text'][:150]+'...'})
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/python3/lib/python3.11/site-packages/pandas/core/indexing.py", line 1073, in getitem
return self._getitem_axis(maybe_callable, axis=axis)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/python3/lib/python3.11/site-packages/pandas/core/indexing.py", line 1625, in _getitem_axis
self._validate_integer(key, axis)
File "/usr/local/python3/lib/python3.11/site-packages/pandas/core/indexing.py", line 1557, in _validate_integer
raise IndexError("single positional indexer is out-of-bounds")
IndexError: single positional indexer is out-of-bounds
from chatpdflike.
Related Issues (6)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chatpdflike.