weditor求助,求助,求助

apple_56849723 2022-10-27 18:32:24

 

可以运行,也可以获取定位页面元素位置,

无法执行命令,运行时很多错误提示,求助

 

(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

 

...全文
568 1 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
meihua233 2022-12-26
  • 打赏
  • 举报
回复

楼主,这个问题有解决吗,我也遇到了

37,744

社区成员

发帖
与我相关
我的任务
社区描述
JavaScript,VBScript,AngleScript,ActionScript,Shell,Perl,Ruby,Lua,Tcl,Scala,MaxScript 等脚本语言交流。
社区管理员
  • 脚本语言(Perl/Python)社区
  • WuKongSecurity@BOB
加入社区
  • 近7日
  • 近30日
  • 至今

试试用AI创作助手写篇文章吧