You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If line api get http status code in 200<= X <300, this should get the LineBotApiError in async_api.py line: 2562
Current Behavior
But it cause, 2024-10-17 14:36:48,548 - root - INFO - error: object method can't be used in 'await' expression
File "/home/azureuser/VHS_short_bk/venv/lib/python3.10/site-packages/linebot/async_api.py", line 2567, in __check_error
error=Error.new_from_json_dict((await response.json)),
TypeError: object method can't be used in 'await' expression
The error cause in async_api.py line 2567,
and I change the line
""" await response.json """
to
""" response.json() """
It got the correct action.
2024-10-17 14:41:49,277 - root - INFO - error: LineBotApiError: status_code=400, request_id=, error_response={"details": [{"message": "cannot contain null elements", "property": "/body/contents"}], "message": "A message (messages[0])\u00a0in the request body is invalid"}, headers={'server': 'legy', 'cache-control': 'no-cache, no-store, max-age=0, must-revalidate', 'content-type': 'application/json', 'date': 'Thu, 17 Oct 2024 06:41:49 GMT', 'expires': '0', 'pragma': 'no-cache', 'x-content-type-options': 'nosniff', 'x-frame-options': 'DENY', 'x-line-request-id': , 'x-xss-protection': '1; mode=block', 'content-length': '152'}
I got the error message that I want.
The text was updated successfully, but these errors were encountered:
System Informations
Expected Behavior
If line api get http status code in 200<= X <300, this should get the LineBotApiError in async_api.py line: 2562
Current Behavior
But it cause, 2024-10-17 14:36:48,548 - root - INFO - error: object method can't be used in 'await' expression
File "/home/azureuser/VHS_short_bk/venv/lib/python3.10/site-packages/linebot/async_api.py", line 2567, in __check_error
error=Error.new_from_json_dict((await response.json)),
TypeError: object method can't be used in 'await' expression
The error cause in async_api.py line 2567,
and I change the line
""" await response.json """
to
""" response.json() """
It got the correct action.
2024-10-17 14:41:49,277 - root - INFO - error: LineBotApiError: status_code=400, request_id=, error_response={"details": [{"message": "cannot contain null elements", "property": "/body/contents"}], "message": "A message (messages[0])\u00a0in the request body is invalid"}, headers={'server': 'legy', 'cache-control': 'no-cache, no-store, max-age=0, must-revalidate', 'content-type': 'application/json', 'date': 'Thu, 17 Oct 2024 06:41:49 GMT', 'expires': '0', 'pragma': 'no-cache', 'x-content-type-options': 'nosniff', 'x-frame-options': 'DENY', 'x-line-request-id': , 'x-xss-protection': '1; mode=block', 'content-length': '152'}
I got the error message that I want.
The text was updated successfully, but these errors were encountered: