Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

部分作业 grade.py 在代码超时后的报错信息有误 #7

Closed
Light1110 opened this issue Aug 28, 2020 · 3 comments
Closed

部分作业 grade.py 在代码超时后的报错信息有误 #7

Light1110 opened this issue Aug 28, 2020 · 3 comments

Comments

@Light1110
Copy link

nn 这次作业为例,若我将 nn.py 的内容改为

import time
time.sleep(2)

并运行 grade.py ,期望得到的报错信息是

Testcase data/in_1.hdf5: Time limit exceeded
Testcase data/in_2.hdf5: Time limit exceeded
...
Total Points: 0/100

实际得到的报错信息是

Testcase data/in_1.hdf5: No output file found
Testcase data/in_2.hdf5: No output file found
...
Total Points: 0/100
@Light1110
Copy link
Author

同样以 nn 这次作业为例,问题似乎出现在 grade.py 的 46 行左右,在

while p.poll() is None:
    if time.time() - start_time > 1:
        ...
else:
    ...

while 内部似乎缺少了 break ,使 else 部分必然运行
if 语句内部最后添加 break 似乎可以解决问题

@liukn-thp
Copy link

hgnb!👍

@ZenithalHourlyRate
Copy link
Contributor

fixed

@physics-data physics-data locked and limited conversation to collaborators Aug 14, 2021

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants