From 0a66b07a293604ea8e3c280f104ff4085effb670 Mon Sep 17 00:00:00 2001 From: codeskyblue Date: Mon, 13 May 2024 16:06:38 +0800 Subject: [PATCH] update message --- uiautomator2/core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/uiautomator2/core.py b/uiautomator2/core.py index 3749b88..047f8e7 100644 --- a/uiautomator2/core.py +++ b/uiautomator2/core.py @@ -129,7 +129,7 @@ def _jsonrpc_call(dev: adbutils.AdbDevice, method: str, params: Any, timeout: fl if isinstance(data, dict) and "error" in data: logger.debug("jsonrpc error: %s", data) code = data['error'].get('code') - message = data['error'].get('message') + message = data['error'].get('message', '') stacktrace = data['error'].get('data') if "UiAutomation not connected" in r.text: raise UiAutomationNotConnectedError("UiAutomation not connected")