Skip to content
This repository has been archived by the owner on Oct 19, 2020. It is now read-only.

Requests stall forever in urllib.urlopen #4

Open
jrk opened this issue Sep 16, 2010 · 5 comments
Open

Requests stall forever in urllib.urlopen #4

jrk opened this issue Sep 16, 2010 · 5 comments

Comments

@jrk
Copy link

jrk commented Sep 16, 2010

Running the latest , requests seem to spin forever waiting for data in on line 82 of phone. Testing manually, urllib.urlopen(your,params).read() never returns anything. curl -k -u my:keys -d"label=phonepipe&title=Hi&msg=Message&uri=" https://api.notifo.com/v1/send_notification works as expected at the same time, from the same host.

@drewcrawford
Copy link
Owner

Hi jrk,

I'm having some trouble reproducing this one. Are you behind any weird proxies? Can I get some more details about OS configuration?

Cheers
Drew

@jrk
Copy link
Author

jrk commented Sep 17, 2010

This is on OS X 10.6.4 with system Python 2.6.1. It seems it's a bad interaction with Privoxy. Disabling Privoxy altogether fixes the problem, but bypassing Privoxy for [api.]notifo.com in the Network preferences, and/or in the Privoxy settings, doesn't seem to fix the problem.

@drewcrawford
Copy link
Owner

Reading over the Python documentation, I'm wondering if the bug is in upstream python. Supposedly, urllib automagically should sort out the proxies from System Preferences, but I wouldn't be surprised if it's not incredibly thorough.

Have you tried replacing it with urllib2.urlopen? If this solves your problem, I could move the library to urllib2. Otherwise I will probably need to set up an identical network configuration and try to pursue this in upstream python.

@jrk
Copy link
Author

jrk commented Sep 24, 2010

I suspected exactly this and did poke around. I didn't finish trying urllib2 I believe because it required a different mechanism than you use to set up the auth parameters (and I only had a few minutes to explore), but just manually running through the basic urllib fetch you do in a Python console produces the same hang.

@drewcrawford
Copy link
Owner

I really suspect a bug in upstream Python in terms of how it handles getting the proxy rules from OSX. To be honest, I probably won't get around to testing with urllib2 any time soon.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants