37,744
社区成员




可以运行,也可以获取定位页面元素位置,
无法执行命令,运行时很多错误提示,求助
(venv) D:\pythonProject1>weditor
listening on http://192.168.10.205:17310
[I 221027 18:12:36 web:2271] 304 GET / (::1) 7.98ms
[I 221027 18:12:37 shell:47] Started drain subprocess stdout in thread
[I 221027 18:12:37 web:2271] 101 GET /ws/v1/python (::1) 6.98ms
[I 221027 18:12:37 shell:189] create process pid: 5076
[I 221027 18:12:37 web:2271] 304 GET /api/v1/version (::1) 1.00ms
[I 221027 18:13:01 web:2271] 200 POST /api/v1/connect (::1) 2019.57ms
[W 221027 18:13:01 shell:153] Unsupported output line: Traceback (most recent call last):
[W 221027 18:13:01 shell:153] Unsupported output line: File "D:\pythonProject1\venv\lib\site-packages\weditor\web\ipyshell-console.py", line 154, in main
[W 221027 18:13:01 shell:153] Unsupported output line: File "D:\pythonProject1\venv\lib\site-packages\weditor\web\ipyshell-console.py", line 36, in exec_code
[W 221027 18:13:01 shell:153] Unsupported output line: File "D:\pythonProject1\venv\lib\site-packages\colorama\ansitowin32.py", line 47, in write
[W 221027 18:13:01 shell:153] Unsupported output line: File "D:\pythonProject1\venv\lib\site-packages\colorama\ansitowin32.py", line 177, in write
[W 221027 18:13:01 shell:153] Unsupported output line: File "D:\pythonProject1\venv\lib\site-packages\colorama\ansitowin32.py", line 205, in write_and_convert
[W 221027 18:13:01 shell:153] Unsupported output line: File "D:\pythonProject1\venv\lib\site-packages\colorama\ansitowin32.py", line 211, in write_plain_text
[W 221027 18:13:01 shell:153] Unsupported output line: AttributeError: 'MockStdout' object has no attribute 'flush'
[W 221027 18:13:01 shell:129] proc-stdout read empty line
[I 221027 18:13:01 page:204] Serial: android:Q5S0219429004815
[I 221027 18:13:01 shell:51] windows process stdout closed
[I 221027 18:13:01 web:2271] 200 GET /api/v1/devices/android%3AQ5S0219429004815/screenshot (::1) 403.29ms
[I 221027 18:13:02 web:2271] 200 GET /api/v2/devices/android%3AQ5S0219429004815/hierarchy (::1) 726.12ms
[E 221027 18:20:54 ioloop:760] Exception in callback functools.partial(<function WebSocketProtocol._run_callback.<locals>.<lambda> at 0x0000021EEB0723B0>, <Task finished name='Task-4974' cor
o=<PythonShellHandler.on_message() done, defined at D:\pythonProject1\venv\lib\site-packages\weditor\web\handlers\shell.py:204> exception=OSError(22, 'Invalid argument')>)
Traceback (most recent call last):
File "D:\pythonProject1\venv\lib\site-packages\tornado\ioloop.py", line 740, in _run_callback
ret = callback()
File "D:\pythonProject1\venv\lib\site-packages\tornado\websocket.py", line 644, in <lambda>
self.stream.io_loop.add_future(result, lambda f: f.result())
File "D:\pythonProject1\venv\lib\site-packages\weditor\web\handlers\shell.py", line 212, in on_message
await self.__process.stdin_write(code.encode('utf-8'))
File "D:\pythonProject1\venv\lib\site-packages\weditor\web\handlers\shell.py", line 66, in stdin_write
return self.proc.stdin.write(data)
OSError: [Errno 22] Invalid argument
[E 221027 18:20:54 web:1798] Uncaught exception GET /ws/v1/python (::1)
HTTPServerRequest(protocol='http', host='localhost:17310', method='GET', uri='/ws/v1/python', version='HTTP/1.1', remote_ip='::1')
Traceback (most recent call last):
File "D:\pythonProject1\venv\lib\site-packages\tornado\web.py", line 1713, in _execute
result = await result
File "D:\pythonProject1\venv\lib\site-packages\tornado\websocket.py", line 277, in get
await self.ws_connection.accept_connection(self)
File "D:\pythonProject1\venv\lib\site-packages\tornado\websocket.py", line 867, in accept_connection
await self._accept_connection(handler)
File "D:\pythonProject1\venv\lib\site-packages\tornado\websocket.py", line 950, in _accept_connection
await self._receive_frame_loop()
File "D:\pythonProject1\venv\lib\site-packages\tornado\websocket.py", line 1106, in _receive_frame_loop
await self._receive_frame()
File "D:\pythonProject1\venv\lib\site-packages\tornado\websocket.py", line 1197, in _receive_frame
await handled_future
OSError: [Errno 22] Invalid argument
exiting...
[I 221027 18:21:23 __main__:73] exit success
楼主,这个问题有解决吗,我也遇到了