gpt4 book ai didi

python - subprocess.call 带有 rpyc 抛出错误

转载 作者:行者123 更新时间:2023-12-01 04:33:10 26 4
gpt4 key购买 nike

我正在使用 RPyc 在远程计算机上执行命令。当我运行以下代码时出现错误:

cmd = ['clonetst.exe', 'C:\\Users\\pqalinux\\Desktop\\Flowcontrol.tst', 'C:\\Users\\pqalinux\\Desktop\\lst_20150819_110008.lst', 'C:\\Users\\pqalinux\\Desktop\\tst_20150819_110008.tst']
self.host = rpyc.classic.connect(self.ip)
StatusCode = self.host.modules.subprocess.check_call(cmd)

远程回溯是:

Failed to create tst file: [Errno 2] The system cannot find the file specified

========= Remote Traceback (1) =========
Traceback (most recent call last):
File "C:\Program Files (x86)\IronPython 2.7\lib\site-packages\rpyc\core\protocol.py", line 305, in _dispatch_request
res = self._HANDLERS[handler](self, *args)
File "C:\Program Files (x86)\IronPython 2.7\lib\site-packages\rpyc\core\protocol.py", line 535, in _handle_call
return self._local_objects[oid](*args, **dict(kwargs))
File "C:\Program Files (x86)\IronPython 2.7\Lib\subprocess.py", line 507, in check_call
retcode = call(*popenargs, **kwargs)
File "C:\Program Files (x86)\IronPython 2.7\Lib\subprocess.py", line 494, in call
return Popen(*popenargs, **kwargs).wait()
File "C:\Program Files (x86)\IronPython 2.7\Lib\subprocess.py", line 675, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Program Files (x86)\IronPython 2.7\Lib\subprocess.py", line 887, in _execute_child
hp, ht, pid, tid = _subprocess.CreateProcess(executable, args,
WindowsError: [Errno 2] The system cannot find the file specified

可能是什么问题?有什么想法吗?

最佳答案

远程计算机上未安装“clonetst.exe”,或者它既不在路径上也不在当前目录中。确保它已安装并永久添加到路径或环境字典中。

关于python - subprocess.call 带有 rpyc 抛出错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32087375/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com