财务管理模块出问题
来源:2-3 申请小程序的流程
不是一般的扯淡
2021-04-15
KeyError
KeyError: 2
Traceback (most recent call last)
File “Z:\python\lib\site-packages\flask\app.py”, line 2464, in call
return self.wsgi_app(environ, start_response)
File “Z:\python\lib\site-packages\flask\app.py”, line 2450, in wsgi_app
response = self.handle_exception(e)
File “Z:\python\lib\site-packages\flask\app.py”, line 1867, in handle_exception
reraise(exc_type, exc_value, tb)
File “Z:\python\lib\site-packages\flask_compat.py”, line 39, in reraise
raise value
File “Z:\python\lib\site-packages\flask\app.py”, line 2447, in wsgi_app
response = self.full_dispatch_request()
File “Z:\python\lib\site-packages\flask\app.py”, line 1952, in full_dispatch_request
rv = self.handle_user_exception(e)
File “Z:\python\lib\site-packages\flask\app.py”, line 1821, in handle_user_exception
reraise(exc_type, exc_value, tb)
File “Z:\python\lib\site-packages\flask_compat.py”, line 39, in reraise
raise value
File “Z:\python\lib\site-packages\flask\app.py”, line 1950, in full_dispatch_request
rv = self.dispatch_request()
File “Z:\python\lib\site-packages\flask\app.py”, line 1936, in dispatch_request
return self.view_functionsrule.endpoint
File “E:\订餐系统\web\controllers\finance\Finance.py”, line 65, in index
tmp_food_info = food_mapping[ tmp_order_item.food_id ]
KeyError: 2
The debugger caught an exception in your WSGI application. You can now look at the traceback which led to the error.
To switch between the interactive traceback and the plaintext one, you can click on the “Traceback” headline. From the text traceback you can also create a paste of it. For code execution mouse-over the frame you want to debug and click on the console icon on the right side.
You can execute arbitrary Python code in the stack frames and there are some extra helpers available for introspection:
dump() shows all variables in the frame
dump(obj) dumps all that’s known about the object
Brought to you by DON’T PANIC, your friendly Werkzeug powered traceback interpreter.
1回答
-
不是一般的扯淡
提问者
2021-04-15
已解决
112021-04-20
相似问题