Python reviewboard postreview - KeyError:review_request

时间:2012-11-03 17:07:07

标签: python dictionary

我有一个ReviewBoard v1.6.13 网站设置,以便我可以使用Perforce使用Perforce来审核请求。
我已经使用以下命令将 postreview.py python脚本从[RBTools v0.4.2]编译为 postreview.exe

  • Python v2.7.3
  • Python Win32扩展pywin32-218.win32-py2.7.exe
  • PyInstaller v2.0
  • (也下载了DiffUtils v2.8.7-1以测试后期审核工具)

然而,当我运行postreview.exe(甚至是直接的.py脚本)时,我不断获得相同的python调用堆栈:

Traceback (most recent call last):
    File "F:\RBTools-0.4.2\rbtools\postreview.py", line 1314, in <module>
        main()
    File "F:\RBTools-0.4.2\rbtools\postreview.py", line 1296, in main
        submit_as=options.submit_as)
    File "F:\RBTools-0.4.2\rbtools\postreview.py", line 862, in tempt_fate
        review_request = server.new_review_request(changenum, submit_as)
    File "F:\RBTools-0.4.2\rbtools\postreview.py", line 441, in new_review_request
        return rsp['review_request']
    KeyError: 'review_request'  

我用于测试的论据(由于显而易见的原因略有改变):

--server=http://myreviewboardsite --disable-proxy --submit-as=jdoe --publish --target-groups=Test --branch=//mydepot/test/ 191205 --debug --username=guest --password=helloworld

这是使用--debug参数后的完整输出。

>>> RBTools 0.4.2
>>> Python 2.7.3 (default, Apr 10 2012, 23:31:26) [MSC v.1500 32 bit (Intel)]
>>> Running on Windows-7-6.1.7600
>>> Home = C:\Users\misterwilson\AppData\Roaming
>>> Current Directory = F:\pyinstaller-2.0\postreview\dist
>>> Checking the repository type. Errors shown below are mostly harmless.
DEBUG:root:Checking for a CVS repository...
DEBUG:root:Checking for a ClearCase repository...
DEBUG:root:Checking for a Git repository...
DEBUG:root:Checking for a Mercurial repository...
DEBUG:root:Checking for a Perforce repository...
DEBUG:root:Running: p4 info
DEBUG:root:Running: diff --version
DEBUG:root:repository info: Path: p4-devserver:1666, Base path: None, Supports changesets: True
>>> Finished checking the repository type.
>>> Disabling HTTP(s) proxy support
>>> HTTP GETting api/
>>> HTTP GETting http://myreviewboardsite/api/info/
>>> Using the new web API
INFO:root:Generating diff for changenum 191205
DEBUG:root:Running: p4 describe -s 191205
DEBUG:root:Processing edit of //mydepot/test/HelloWorld.xml
DEBUG:root:Writing "//mydepot/test/HelloWorld.xml#12" to "c:\users\misterwilson\appdata\local\temp\tmp_knbys"
DEBUG:root:Running: p4 print -o c:\users\misterwilson\appdata\local\temp\tmp_knbys -q //mydepot/test/HelloWorld.xml#12
DEBUG:root:Running: diff -urNp c:\users\misterwilson\appdata\local\temp\tmp_knbys F:\P4\1666\mydepot\test\HelloWorld.xml
DEBUG:root:Command exited with rc 1: ['diff', '-urNp', 'c:\\users\\misterwilson\\appdata\\local\\temp\\tmp_knbys', 'F:\\P4\\1666\\mydepot\\test\\HelloWorld\\LauncherVirtuos.xml']
--- c:\users\misterwilson\appdata\local\temp\tmp_knbys       2012-11-03 11:27:03.854484100 -0400
+++ F:\P4\1666\mydepot\test\HelloWorld.xml  2012-10-25 18:47:36.736320400 -0400
@@ -295,7 +295,7 @@ ´╗┐<?xml version="1.0" encoding="utf-8"
           goto REMOVEOUTPUT
         </if>
   </operation>
-      <operation name="VerifyPerforceClient" visible="0">
+      <operation name="VerifyPerforceClient" visible="0">
                 p4 clients -u [PerforceUsername] -e "[PerforceClientSpec]" | find "[PerforceClientSpec]" > nul
                 if not errorlevel 1 (
                 goto ChkHost
@@ -344,18 +344,18 @@ ´╗┐<?xml version="1.0" encoding="utf-8"

         :VERIFY_END
       </operation>

... More Perforce Diff output

---
>>> Attempting to create review request on p4-devserver:1666 for 191205
>>> Submitting the review request as jdoe
>>> HTTP POSTing to http://myreviewboardsite/api/review-requests/: {'changenum': '191205', 'submit_as': 'jdoe', 'repository': 'p4-devserver:1666'}
>>> Review request created
Traceback (most recent call last):
  File "F:\RBTools-0.4.2\rbtools\postreview.py", line 1314, in <module>
    main()
  File "F:\RBTools-0.4.2\rbtools\postreview.py", line 1296, in main
    submit_as=options.submit_as)
  File "F:\RBTools-0.4.2\rbtools\postreview.py", line 862, in tempt_fate
    review_request = server.new_review_request(changenum, submit_as)
  File "F:\RBTools-0.4.2\rbtools\postreview.py", line 441, in new_review_request

    return rsp['review_request']
KeyError: 'review_request'

任何人都可以帮我解决问题所在吗?

谢谢,

MisterW

0 个答案:

没有答案