Unexpected character ('<' (code 60)): expected a valid value (number, String, array, object, 'true', 'false' or 'null') at [Source: (byte[])"<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <title>500 Internal Server Error</title> <h1>Internal Server Error</h1> <p>The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.</p> "; line: 1, column: 2]
然后在代码日志里,报错如下:
[pid: 11|app: 0|req: 1/6] 124.251.57.85 () {44 vars in 1075 bytes} [Sat Feb 20 13:04:26 2021] POST /miai?token=XXXXXX => generated 382 bytes in 273 msecs (HTTP/1.1 200) 2 headers in 72 bytes (1 switches on core 0)
[2021-02-21 01:10:17,719] WARNING in app: {'version': '1.0', 'session': {'is_new': False, 'session_id': '679301010715581440_289c31a243e24a8c80ab291951b721da', 'application': {'app_id': '679301010715581440'}, 'user': {'user_id': 'yej9H1OvG8dDwKQukWIQzg==', 'is_user_login': True, 'gender': 'unknown'}}, 'request': {'type': 0, 'request_id': '1e5128d87ac14065b7cc0e4325b309dd', 'timestamp': 1613869817010, 'intent': {'query': '打开意念', 'score': 0.800000011920929, 'complete': True, 'domain': 'openplatform', 'confidence': 1, 'skillType': 'Custom', 'sub_domain': '1018547', 'app_id': '679301010715581440', 'request_type': 'Start', 'need_fetch_token': False, 'is_direct_wakeup': False, 'slots': '{"intent_name":"Mi_Welcome"}', 'is_qc': False, 'recall_method': 'WakeupInternal'}, 'locale': 'zh-CN', 'slot_info': {'intent_name': 'Mi_Welcome'}, 'is_monitor': True}, 'query': '打开意念', 'context': {'device_id': 'kJPzuf7tIBp9nLbgjKB8xQ==', 'user_agent': 'AHC/2.0', 'device_category': 'soundbox', 'in_exp': False}}
[2021-02-21 01:10:17,852] WARNING in app: None
[pid: 1|app: 0|req: 6/7] 124.251.57.41 () {44 vars in 1075 bytes} [Sun Feb 21 01:10:17 2021] POST /miai?token=XXXXXXXX => generated 382 bytes in 228 msecs (HTTP/1.1 200) 2 headers in 72 bytes (1 switches on core 1)
[2021-02-21 01:10:31,912] WARNING in app: {'version': '1.0', 'session': {'is_new': False, 'session_id': '679301010715581440_289c31a243e24a8c80ab291951b721da', 'application': {'app_id': '679301010715581440'}, 'user': {'user_id': 'yej9H1OvG8dDwKQukWIQzg==', 'is_user_login': True, 'gender': 'unknown'}, 'attributes': {'sessi_id': '12345'}}, 'request': {'type': 1, 'request_id': 'c699db8c38b64ca38dd7ef5c6ec7e3a0', 'timestamp': 1613869831812, 'intent': {'query': '打开吊灯', 'score': 0.800000011920929, 'complete': True, 'domain': 'openplatform', 'confidence': 1, 'skillType': 'Custom', 'sub_domain': '1018547', 'app_id': '679301010715581440', 'request_type': 'Intent', 'need_fetch_token': False, 'is_direct_wakeup': False}, 'locale': 'zh-CN', 'is_monitor': True}, 'query': '打开吊灯', 'context': {'device_id': '5GvDAd023N/avND2aoGCPw==', 'user_agent': 'AHC/2.0', 'device_category': 'soundbox', 'in_exp': False}}
[2021-02-21 01:10:32,021] WARNING in app: None
[2021-02-21 01:10:32,022] ERROR in app: Exception on /miai [POST]
Traceback (most recent call last):
File "/usr/lib/python3.8/site-packages/flask/app.py", line 2447, in wsgi_app
response = self.full_dispatch_request()
File "/usr/lib/python3.8/site-packages/flask/app.py", line 1952, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/lib/python3.8/site-packages/flask/app.py", line 1821, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/usr/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise
raise value
File "/usr/lib/python3.8/site-packages/flask/app.py", line 1950, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/lib/python3.8/site-packages/flask/app.py", line 1936, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "./app.py", line 126, in index
if data_x["request"]["slot_info"]["intent_name"] == "Mi_Welcome":
KeyError: 'slot_info'