报错代码:
Exception in thread Thread-3 (getevent):
Traceback (most recent call last):
File "C:\Users*\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1073, in _bootstrap_inner
self.run()
File "C:\Users*\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1010, in run
self._target(self._args, self._kwargs)
File "C:\Users\\Desktop\s\main.py", line 252, in getevent
process = subprocess.Popen(['adb', 'shell', 'getevent', '-l'], stdin=subprocess.PIPE, stdout=subprocess.PIPE)
File "C:\Users*\AppData\Local\Programs\Python\Python312\Lib\subprocess.py", line 1026, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Users**\AppData\Local\Programs\Python\Python312\Lib\subprocess.py", line 1538, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] 系统找不到指定的文件。
很奇怪的报错
报错代码: Exception in thread Thread-3 (getevent): Traceback (most recent call last): File "C:\Users*\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1073, in _bootstrap_inner self.run() File "C:\Users*\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1010, in run self._target(self._args, self._kwargs) File "C:\Users\\Desktop\s\main.py", line 252, in getevent process = subprocess.Popen(['adb', 'shell', 'getevent', '-l'], stdin=subprocess.PIPE, stdout=subprocess.PIPE) File "C:\Users*\AppData\Local\Programs\Python\Python312\Lib\subprocess.py", line 1026, in init self._execute_child(args, executable, preexec_fn, close_fds, File "C:\Users**\AppData\Local\Programs\Python\Python312\Lib\subprocess.py", line 1538, in _execute_child hp, ht, pid, tid = _winapi.CreateProcess(executable, args, FileNotFoundError: [WinError 2] 系统找不到指定的文件。
依赖库都已安装,使用了pyserial而不是serial。