Hi Oliver,

Off-hand, I don't know. One common reason for that hanging is that the URL
is actually a redirect, which by default urllib2 does not handle. Another
possibility is that it's going through a proxy and something's getting
stuck.

Christian

-- 
Christian Hammond - chip...@chipx86.com
Review Board - http://www.review-board.org
VMware, Inc. - http://www.vmware.com


On Tue, Jul 14, 2009 at 9:56 PM, Oliver Jones <orjo...@gmail.com> wrote:

> I'm currently having a problem with post-review where it hangs waiting on a
> response from a reviewboard json request.
>
> The code where it hangs is in http_post method.
>
>  r = urllib2.Request(url, body, headers)
>  data = urllib2.urlopen(r).read()                 # <--- hangs here
>
> I'm using reviewboard 1.0 and the post-review script from
> RBTools-0.2beta1-py2.5.egg
>
> I've applied a patch against post-review to solve some bugs I encountered
> (which is attached).
>
> I'm running/debugging post-review and reviewboard on the same machine which
> is a Windows server.
>
> Any hints on why this would be the case would be helpful.
>
> Debug output:
>
> Y:\Order_Management_Products_VOB\TraderWorkstationMS\Dev>d:\rb\post-review.py
> -d --summary="Test summary" --description="Test desc" update_paraffin.cmd
> >>> cleartool pwv -short
> >>> repository info: Path: Y:\, Base path: Y:\, Supports changesets: False
> >>> cleartool desc -pre
> Y:\Order_Management_Products_VOB\TraderWorkstationMS\Dev\update_paraffin.cmd
> >>> cleartool desc -fmt %Vn Y:\
> >>> cleartool desc -fmt %Vn Y:\Order_Management_Products_VOB
> >>> cleartool desc -fmt %Vn
> Y:\Order_Management_Products_VOB\TraderWorkstationMS
> >>> cleartool desc -fmt %Vn
> Y:\Order_Management_Products_VOB\TraderWorkstationMS\Dev
> >>> cleartool desc -fmt %Vn Y:\
> >>> cleartool desc -fmt %Vn Y:\Order_Management_Products_VOB
> >>> cleartool desc -fmt %Vn
> Y:\Order_Management_Products_VOB\TraderWorkstationMS
> >>> cleartool desc -fmt %Vn
> Y:\Order_Management_Products_VOB\TraderWorkstationMS\Dev
> >>> Looking for 'mdsbu01.fw.gsjbw.com /reviewboard/' cookie in
> C:\WINNT\Profiles\bldjb001\Local Settings\Application
> Data\.post-review-cookies.txt
> >>> Loaded valid cookie -- no login required
> >>> Attempting to create review request for None
> >>> HTTP POSTing to
> http://mdsbu01.fw.gsjbw.com/reviewboard/api/json/reviewrequests/new/:
> {'repository_path': 'Y:\\'}
> >>> url:
> http://mdsbu01.fw.gsjbw.com/reviewboard/api/json/reviewrequests/new/
> >>> body: --172.18.240.42.1.3628.1247633073.176.1
> Content-Disposition: form-data; name="repository_path"
> Y:\
> --172.18.240.42.1.3628.1247633073.176.1--
>
> >>> body: {'Content-Length': '149', 'Content-Type': 'multipart/form-data;
> boundary=172.18.240.42.1.3628.1247633073.176.1'}
> >>> Review request created
> >>> Attempting to set field 'summary' to 'Test summary' for review request
> '10'
> >>> HTTP POSTing to
> http://mdsbu01.fw.gsjbw.com/reviewboard/api/json/reviewrequests/10/draft/set/:
> {'summary': 'Test summary'}
> >>> url:
> http://mdsbu01.fw.gsjbw.com/reviewboard/api/json/reviewrequests/10/draft/set/
> >>> body: --172.18.240.42.1.3628.1247633073.223.2
> Content-Disposition: form-data; name="summary"
> Test summary
> --172.18.240.42.1.3628.1247633073.223.2--
>
> >>> body: {'Content-Length': '150', 'Content-Type': 'multipart/form-data;
> boundary=172.18.240.42.1.3628.1247633073.223.2'}
> >>> Attempting to set field 'description' to 'VIEW: bldjb001_view3
> VIEWTYPE: dynamic
> Test desc' for review request '10'
> >>> HTTP POSTing to
> http://mdsbu01.fw.gsjbw.com/reviewboard/api/json/reviewrequests/10/draft/set/:
> {'description': 'VIEW: bldjb001_view3\nVIEWTYPE: dynamic\nTest desc'}
> >>> url:
> http://mdsbu01.fw.gsjbw.com/reviewboard/api/json/reviewrequests/10/draft/set/
> >>> body: --172.18.240.42.1.3628.1247633073.301.3
> Content-Disposition: form-data; name="description"
> VIEW: bldjb001_view3
> VIEWTYPE: dynamic
> Test desc
> --172.18.240.42.1.3628.1247633073.301.3--
>
> >>> body: {'Content-Length': '190', 'Content-Type': 'multipart/form-data;
> boundary=172.18.240.42.1.3628.1247633073.301.3'}
> >>> HTTP POSTing to
> http://mdsbu01.fw.gsjbw.com/reviewboard/api/json/reviewrequests/10/draft/save/:
> {}
> >>> url:
> http://mdsbu01.fw.gsjbw.com/reviewboard/api/json/reviewrequests/10/draft/save/
> >>> body: --172.18.240.42.1.3628.1247633073.363.4--
>
> >>> body: {'Content-Length': '45', 'Content-Type': 'multipart/form-data;
> boundary=172.18.240.42.1.3628.1247633073.363.4'}
> >>> Review request draft saved
> >>> Uploading diff, size: 481
> >>> HTTP POSTing to
> http://mdsbu01.fw.gsjbw.com/reviewboard/api/json/reviewrequests/10/diff/new/:
> {'basedir': 'Y:\\'}
> >>> url:
> http://mdsbu01.fw.gsjbw.com/reviewboard/api/json/reviewrequests/10/diff/new/
> >>> body: --172.18.240.42.1.3628.1247633073.426.5
> Content-Disposition: form-data; name="basedir"
> Y:\
> --172.18.240.42.1.3628.1247633073.426.5
> Content-Disposition: form-data; name="path"; filename="diff"
> ---
> Y:\Order_Management_Products_VOB\@@\main\79\TraderWorkstationMS\@@\main\3\Dev\@@\main\25\update_paraffin.cmd\@@\main\0
> 2002-02-21 23:30:39.942229878 -0800
> +++
> Y:\Order_Management_Products_VOB\@@\main\79\TraderWorkstationMS\@@\main\3\Dev\@@\main\25\update_paraffin.cmd\@@\main\1
> 2002-02-21 23:30:50.442260588 -0800
> @@ -1,0 +1,8 @@
> +...@echo off
> +pushd OrderManagement
> +call run_build.cmd update-paraffin
> +popd
> +
> +pushd TraderCentre
> +call run_build.cmd update-paraffin
> +popd
> --172.18.240.42.1.3628.1247633073.426.5--
>
> >>> body: {'Content-Length': '729', 'Content-Type': 'multipart/form-data;
> boundary=172.18.240.42.1.3628.1247633073.426.5'}
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"reviewboard" group.
To post to this group, send email to reviewboard@googlegroups.com
To unsubscribe from this group, send email to 
reviewboard+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/reviewboard?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to