在个别分辨率比较高的手机上(oppo find x3 pro)截图异常
Opened this issue · 0 comments
`[E 220318 14:59:01 web:1789] Uncaught exception GET /api/v1/devices/android%3A719cd453/screenshot (::1)
HTTPServerRequest(protocol='http', host='localhost:17310', method='GET', uri='/api/v1/devices/android%3A719cd453/screenshot', version='HTTP/1.1', remote_ip='::1')
Traceback (most recent call last):
File "C:\Python39\Lib\site-packages\uiautomator2_init_.py", line 862, in screenshot
return Image.open(buff).convert("RGB")
File "C:\Python39\Lib\site-packages\PIL\Image.py", line 2943, in open
raise UnidentifiedImageError(
PIL.UnidentifiedImageError: cannot identify image file <_io.BytesIO object at 0x00000125C05CE770>
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Python39\Lib\site-packages\tornado\web.py", line 1702, in _execute
result = method(*self.path_args, **self.path_kwargs)
File "e:\git\web-editor\weditor\web\handlers\page.py", line 208, in get
d.screenshot().convert("RGB").save(buffer, format='JPEG')
File "e:\git\web-editor\weditor\web\device.py", line 35, in screenshot
return self._d.screenshot()
File "<decorator-gen-10>", line 2, in screenshot
File "C:\Python39\Lib\site-packages\retry\api.py", line 73, in retry_decorator
return __retry_internal(partial(f, *args, **kwargs), exceptions, tries, delay, max_delay, backoff, jitter,
File "C:\Python39\Lib\site-packages\retry\api.py", line 33, in __retry_internal
return f()
File "C:\Python39\Lib\site-packages\uiautomator2\__init__.py", line 867, in screenshot
if d.settings['fallback_to_blank_screenshot']:
NameError: name 'd' is not defined
[E 220318 14:59:01 web:2239] 500 GET /api/v1/devices/android%3A719cd453/screenshot (::1) 5117.13ms
`