ounisangw / CS305-23F-Assignment-1

This is a repository for Programming Assignment 1 in SUSTech CS305, Computer Network course.
11 stars 2 forks source link

process no longer exists? #19

Open creegon opened 10 months ago

creegon commented 10 months ago

无论测试哪一组数据,都会在一开始报类似这样的进程不存在的报错: Traceback (most recent call last): File "C:\Users\Lenovo\AppData\Roaming\Python\Python311\site-packages\psutil_pswindows.py", line 694, in wrapper return fun(self, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Lenovo\AppData\Roaming\Python\Python311\site-packages\psutil_pswindows.py", line 948, in create_time user, system, created = cext.proc_times(self.pid) ^^^^^^^^^^^^^^^^^^^^^^^^^ ProcessLookupError: [Errno 3] assume no such process (originated from GetExitCodeProcess != STILL_ACTIVE)

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "C:\Users\Lenovo\AppData\Roaming\Python\Python311\site-packages\psutil__init.py", line 361, in _init self.create_time() File "C:\Users\Lenovo\AppData\Roaming\Python\Python311\site-packages\psutil\init__.py", line 719, in create_time self._create_time = self._proc.create_time() ^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Lenovo\AppData\Roaming\Python\Python311\site-packages\psutil_pswindows.py", line 696, in wrapper raise convert_oserror(err, pid=self.pid, name=self._name) psutil.NoSuchProcess: process no longer exists (pid=38592)

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "C:\Users\Lenovo\Desktop\PA1 for CS305 2023 Fall_SMTP Server(1)\CS305-23F-Assignment-1\as1-benchmark-release\test.py", line 262, in with TestScenario(os.path.join('fixtures', filename)) as scenario: File "C:\Users\Lenovo\Desktop\PA1 for CS305 2023 Fall_SMTP Server(1)\CS305-23F-Assignment-1\as1-benchmark-release\test.py", line 68, in exit proccccc = psutil.Process(proc.pid) ^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Lenovo\AppData\Roaming\Python\Python311\site-packages\psutil__init.py", line 332, in init__ self._init(pid) File "C:\Users\Lenovo\AppData\Roaming\Python\Python311\site-packages\psutil__init__.py", line 373, in _init raise NoSuchProcess(pid, msg='process PID not found') psutil.NoSuchProcess: process PID not found (pid=38592)

我本地手动启动测试时是没问题的。。?谢谢学长了

ounisangw commented 10 months ago

据我所知,这是在windows环境下运行test产生的问题。你可以尝试在Linux环境下重新运行代码。