hackerkid / hackerkid/codejam-commandline

Command line tools work for practice mode only

未關閉
#14 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
auto-migrated Component-Logic OpSys-All Priority-Low Type-Enhancement Usability
主要語言
Python
星號
0
分支
0
PR 合併指標
30 天內沒有已合併 PR

描述

```
What steps will reproduce the problem?

It seems that the scripts only work in practice mode for me.
$ ./gcj_download_input.py B small 0
$ ./gcj_get_status.py

What is the expected output? What do you see instead?

gcj_download_input.py always shows ServerError in competition mode (it works in
practice mode though):

-------------------------------------------------------------------------------
Small input for "B - Space Emergency" at "source/B-small-0.in"
-------------------------------------------------------------------------------
Getting status of contest 1128486 from "code.google.com"...
200 OK, 71 bytes read from server (60 uncompressed).
Getting user status at contest 1128486 from "code.google.com"...
200 OK, 32 bytes read from server (12 uncompressed).
Downloading practice input file.
Getting input file "source/B-small-0.in" from "code.google.com"...
200 OK, 0 bytes read from server.
ServerError: No response received from the server. This generally happens when:
- You try to download a small input but it is already solved.
- You try to download the large input before solving the small input.
- You try to redownload the large but its timer already expired.

gcj_get_status.py simply shows error messages:

Getting user status at contest 1128486 from "code.google.com"...
200 OK, 32 bytes read from server (12 uncompressed).
Getting events of contest 1128486 from "code.google.com"...
200 OK, 695 bytes read from server (1407 uncompressed).
Traceback (most recent call last):
File "./gcj_get_status.py", line 171, in
main()
File "./gcj_get_status.py", line 143, in main
user_status.FixStatusWithSubmissions(status, submissions, input_spec)
File "/home/svn/public/codejam/lib/user_status.py", line 240, in FixStatusWithSubmissions
for problem_status in status.problem_inputs:
AttributeError: 'NoneType' object has no attribute 'problem_inputs'

What version of the product are you using? On what operating system?

$ python -V
Python 2.6.6

$ uname -a
FreeBSD cn1.leeym.com 8.2-RELEASE FreeBSD 8.2-RELEASE #0: Fri Feb 18 02:24:46
UTC 2011 root@almeida.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386

Please provide any additional information below.

My account is 'leeym@leeym.com' which is not @gmail.com account. Not sure if it
matters.
```

Original issue reported on code.google.com by `leeym%le...@gtempaccount.com` on 22 May 2011 at 11:17

貢獻指南

這個儲存庫沒有索引到貢獻指南

研究方向

Start by reproducing the reported competition-mode behavior with gcj_download_input.py and gcj_get_status.py under the stated Python 2.6 environment. Read the call to lib/user_status.py:240 and compare the response handling for practice and competition mode; done means both commands handle the reported responses without ServerError or the NoneType traceback.

由索引模型根據 Issue 內容生成。

評估

技術堆疊
python
領域
cli
Issue 類型
缺陷
難度
4/5
預估耗時
3-5 天
活躍度
停滯
描述清晰度
基本清楚
新手友好度
25/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。