Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: urllib.urlretrieve never returns???

1,551 views
Skip to first unread message

Chris Angelico

unread,
Mar 17, 2012, 12:34:05 PM3/17/12
to pytho...@python.org
2012/3/18 Laszlo Nagy <gan...@shopzeus.com>:
> In the later case, "log.txt" only contains "#1" and nothing else. If I look
> at pythonw.exe from task manager, then its shows +1 thread every time I
> click the button, and "#1" is appended to the file.

try:
fpath = urllib.urlretrieve(imgurl)[0]
except:
self.Log(traceback.format_exc())
return


Just a stab in the dark, but I'm wondering if something's throwing an
exception when it's running without a GUI? Your except clause
references 'traceback' which I don't see anywhere else - or is that
part of the code you can't share? Anyway, my guess is that something
perhaps tries to write to the console and can't, and it gets stuck
inside format_exc(). Is that testable? For instance, replace the
"fpath=" line with "fpath = 1/0" to raise WhatKindOfIdiotAreYouError
(it's spelled differently, but that's what the computer thinks of
people who ask it to divide by zero) - see what that does. Or maybe
add self.log("#1.5") at the beginning of the except: clause.

Without all your code, I can't actually run it to test, so it's
entirely possible that I'm completely wrong here.

ChrisA

Laszlo Nagy

unread,
Mar 17, 2012, 1:31:33 PM3/17/12
to pytho...@python.org
2012.03.17. 17:34 keltezéssel, Chris Angelico wrote
> 2012/3/18 Laszlo Nagy<gan...@shopzeus.com>:
>> In the later case, "log.txt" only contains "#1" and nothing else. If I look
>> at pythonw.exe from task manager, then its shows +1 thread every time I
>> click the button, and "#1" is appended to the file.
> try:
> fpath = urllib.urlretrieve(imgurl)[0]
> except:
> self.Log(traceback.format_exc())
> return
>
>
> Just a stab in the dark, but I'm wondering if something's throwing an
> exception when it's running without a GUI? Your except clause
> references 'traceback' which I don't see anywhere else - or is that
> part of the code you can't share? Anyway, my guess is that something
> perhaps tries to write to the console and can't, and it gets stuck
> inside format_exc(). Is that testable?
You are right, I should have added "import traceback". However, I tried
this:

try:
fpath = urllib.urlretrieve(imgurl)[0]
except:
self.Log("Exception")
return


and still nothing was logged. Another proof is that the number of
threads is increased every time I press the button. So I'm 100% sure
that urlretrieve does not return from the call.


Chris Angelico

unread,
Mar 17, 2012, 1:53:24 PM3/17/12
to pytho...@python.org
On Sun, Mar 18, 2012 at 4:31 AM, Laszlo Nagy <gan...@shopzeus.com> wrote:
> You are right, I should have added "import traceback". However, I tried
> this:
>
>        except:
>            self.Log("Exception")
>
> and still nothing was logged. Another proof is that the number of threads is
> increased every time I press the button. So I'm 100% sure that urlretrieve
> does not return from the call.

Okay, was worth a shot! Hopefully someone else can help more.

ChrisA

Christian Heimes

unread,
Mar 17, 2012, 2:18:25 PM3/17/12
to pytho...@python.org
Am 17.03.2012 15:13, schrieb Laszlo Nagy:
> See attached example code. I have a program that calls exactly the same
> code, and here is the strange thing about it:
>
> * Program is started as "start.py", e.g. with an open console. In this
> case, the program works!
> * Program is started as "start.pyw", e.g. with no open console under
> Windows 7 64bit - the program does not work!

The pythonw.exe may not have the rights to access network resources.
Have you set a default timeout for sockets?

import socket
socket.setdefaulttimeout(10) # 10 seconds

A pyw Python doesn't have stdout, stderr or stdin. Any attempt to write
to them (e.g. print statement, default exception logger) can cause an
exception.

Christian

Laszlo Nagy

unread,
Mar 19, 2012, 3:55:51 AM3/19/12
to pytho...@python.org
Yes, that is why I started the app with

wx.PySimpleApp(redirect=True)

so stdout is redirected into a window. Unfortunately, nothing is logged.

I'm going to turn off the firewall and start as admin today. That might
be the solution. Thanks!

Laszlo Nagy

unread,
Mar 19, 2012, 3:32:03 PM3/19/12
to pytho...@python.org
The pythonw.exe may not have the rights to access network resources.
>> Have you set a default timeout for sockets?
>>
>> import socket
>> socket.setdefaulttimeout(10) # 10 seconds
I have added pythonw.exe to allowed exceptions. Disabled firewall
completely. Set socket timeout to 10 seconds. Still nothing.

urllib.urlretrieve does not return from call....

any other ideas?


Jon Clements

unread,
Mar 19, 2012, 7:04:54 PM3/19/12
to comp.lan...@googlegroups.com, pytho...@python.org
Maybe try using the reporthook option for urlretrieve, just to see if that does anything... If it constantly calls the hook or never calls it, that's one thing.

Alternately, tcpdump/wireshark whatever, to see what the heck is going on with traffic - if any.

hth

Jon
Message has been deleted

Steven D'Aprano

unread,
Mar 19, 2012, 7:26:20 PM3/19/12
to
I'm sorry if I have missed something, or making suggestions you have
already tried, but your original post describing the problem is missing
from my news server.

I gather you are running urlretrieve in a separate thread, inside a GUI?

I have learned that whenever I have inexplicable behaviour in a function,
I should check my assumptions. In this case, (1) are you sure you have
the right urlretrieve, and (2) are you sure that your self.Log() method
is working correctly? Just before the problematic call, do this:

# was:
fpath = urllib.urlretrieve(imgurl)[0]

# becomes:
print(urllib.__file__, urlretrieve)
self.Log(urllib.__file__, urlretrieve)
fpath = urllib.urlretrieve(imgurl)[0]


and ensure that you haven't accidentally shadowed them with something
unexpected. Does the output printed to the console match the output
logged?

What happens if you take the call to urlretrieve out of the thread and
call it by hand? Run urllib.urlretrieve(imgurl) directly in the
interactive interpreter. Does it still hang forever?

When you say it "never" returns, do you mean *never* or do you mean "I
gave up waiting after five minutes"? What happens if you leave it to run
all day?

Perhaps it returns after e.g. seven hours, which would be a mystery in
itself, but at least you have perturbed the problem and have another data
point. Maybe it isn't dead, just really slow. How big are the files you
are trying to retrieve? Try retrieving a really small file. Then try
retrieving a non-existent file.

What happens if you call urlretrieve with a reporthook argument? Does it
print anything?

What happens if you try to browse to imgurl in your web browser? Are you
sure the problem is with urlretrieve and not the source?


--
Steven

Laszlo Nagy

unread,
Mar 20, 2012, 3:08:12 AM3/20/12
to pytho...@python.org
Here you can find the example program and the original post.

http://code.activestate.com/lists/python-list/617894/
>
> I gather you are running urlretrieve in a separate thread, inside a GUI?
Yes.
>
> I have learned that whenever I have inexplicable behaviour in a function,
> I should check my assumptions. In this case, (1) are you sure you have
> the right urlretrieve, and (2) are you sure that your self.Log() method
> is working correctly? Just before the problematic call, do this:
>
> # was:
> fpath = urllib.urlretrieve(imgurl)[0]
>
> # becomes:
> print(urllib.__file__, urlretrieve)
> self.Log(urllib.__file__, urlretrieve)
> fpath = urllib.urlretrieve(imgurl)[0]
I called self.Log() after each line, and also from a general "except:"
clause. Definitely, the line after urlretrieve is not executed, and no
exception is raised. Number of threads goes up (visible from task manager).

It is true that the program uses another module that uses the socket
module and multiple threads. (These are written in pure python.)

If I remove the other module, then there is no error, however it renders
the application useless. If I start the program with a console (e.g.
with python.exe instead of pythonw.exe) then it works. Looks like
opening a console solves the problem, although nothing is ever printed
on the console.
> and ensure that you haven't accidentally shadowed them with something
> unexpected. Does the output printed to the console match the output
> logged?
Well, this cannot be tested. If there is a console, then there is no
problem.
>
> What happens if you take the call to urlretrieve out of the thread and
> call it by hand?
Then it works.
> Run urllib.urlretrieve(imgurl) directly in the
> interactive interpreter. Does it still hang forever?
Then it works perfectly.
>
> When you say it "never" returns, do you mean *never* or do you mean "I
> gave up waiting after five minutes"? What happens if you leave it to run
> all day?
I did not try that. But I have already set socket timeout to 10 seconds,
and definitely it is not waiting for a response from the server.
>
> How big are the files you are trying to retrieve?
34 KB
> Try retrieving a really small file. Then try retrieving a non-existent file.
Good point. I'll try to retrieve a nonexistent file when I get home. :)
>
> What happens if you call urlretrieve with a reporthook argument? Does it
> print anything?
I'll try this too. I'll also try using pycurl or the low level socket
module instead.
>
> What happens if you try to browse to imgurl in your web browser? Are you
> sure the problem is with urlretrieve and not the source?
Yes.


Laszlo Nagy

unread,
Mar 20, 2012, 4:12:12 PM3/20/12
to pytho...@python.org
2012.03.20. 8:08 keltezéssel, Laszlo Nagy írta:
> Here you can find the example program and the original post.
>
> http://code.activestate.com/lists/python-list/617894/
>>
>> I gather you are running urlretrieve in a separate thread, inside a GUI?
> Yes.
>>
>> I have learned that whenever I have inexplicable behaviour in a
>> function,
>> I should check my assumptions. In this case, (1) are you sure you have
>> the right urlretrieve, and (2) are you sure that your self.Log() method
>> is working correctly? Just before the problematic call, do this:
>>
>> # was:
>> fpath = urllib.urlretrieve(imgurl)[0]
>>
>> # becomes:
>> print(urllib.__file__, urlretrieve)
>> self.Log(urllib.__file__, urlretrieve)
>> fpath = urllib.urlretrieve(imgurl)[0]
> I called self.Log() after each line, and also from a general "except:"
> clause. Definitely, the line after urlretrieve is not executed, and no
> exception is raised. Number of threads goes up (visible from task
> manager).
>
> It is true that the program uses another module that uses the socket
> module and multiple threads. (These are written in pure python.)
>
> If I remove the other module, then there is no error, however it
> renders the application useless. If I start the program with a console
> (e.g. with python.exe instead of pythonw.exe) then it works. Looks
> like opening a console solves the problem, although nothing is ever
> printed on the console.
>> and ensure that you haven't accidentally shadowed them with something
>> unexpected. Does the output printed to the console match the output
>> logged?
> Well, this cannot be tested. If there is a console, then there is no
> problem.
>>
>> What happens if you take the call to urlretrieve out of the thread and
>> call it by hand?
> Then it works.
>> Run urllib.urlretrieve(imgurl) directly in the
>> interactive interpreter. Does it still hang forever?
> Then it works perfectly.
>>
>> When you say it "never" returns, do you mean *never* or do you mean "I
>> gave up waiting after five minutes"? What happens if you leave it to run
>> all day?
> I did not try that. But I have already set socket timeout to 10
> seconds, and definitely it is not waiting for a response from the server.
>>
>> How big are the files you are trying to retrieve?
> 34 KB
>> Try retrieving a really small file. Then try retrieving a
>> non-existent file.
> Good point. I'll try to retrieve a nonexistent file when I get home. :)

Today I got a different error message printed on console (program
started with python.exe)



Unhandled exception in thread started by <bound method
FrameLocEdit.GetThumbnail of <locedit.FrameLocEdit; proxy of <Swig
Object of type 'wxPanel *' at 0x4f85300>
>>Unhandled exception in thread started by <bound method
FrameLocEdit.GetThumbnail of <locedit.FrameLocEdit; proxy of <Swig
Object of type 'wxPanel *' at 0x4f85300>
>>Unhandled exception in thread started by <bound method
FrameLocEdit.GetThumbnail of <locedit.FrameLocEdit; proxy of <Swig
Object of type 'wxPanel *' at 0x4f85300>
>>Unhandled exception in thread started by
Traceback (most recent call last):

Traceback (most recent call last):

Traceback (most recent call last):
<bound method FrameLocEdit.GetThumbnail of <locedit.FrameLocEdit; proxy
of <Swig Object of type 'wxPanel *' at 0x4f85300>
>> File "C:\Python\Projects\Warehouserclient_v3\locedit.py", line 917,
in GetThumbnail
File "C:\Python\Projects\Warehouserclient_v3\locedit.py", line 917,
in GetThumbnail
File "C:\Python\Projects\Warehouserclient_v3\locedit.py", line 917,
in GetThumbnail

sys.excepthook is missing
Traceback (most recent call last):

I have never seen a traceback like this before. I didn't install any
excepthook myself.

Program is using wxPython, socket, threads, threading, PIL.

Here is something even more strange. If I click on the button three
times, then absolutely nothing gets printed on stdout. However, if I
close the program with file/exit (actually, calling
wx.PySimpleApp.ExitMainLoop) then suddenly three stack traces are
printed on stdout, all lines mixed up:

Unhandled exception in thread started by <bound method
FrameLocEdit.GetThumbnail of <locedit.FrameLocEdit; proxy of <Swig
Object of type 'wxPanel *' at 0x4fb530
0>
>>Unhandled exception in thread started by Unhandled exception in
thread started by <bound method FrameLocEdit.GetThumbnail of
<locedit.FrameLocEdit; proxy of <Swig Object of type 'wxPanel *' at
0x4fb5300>
>>Unhandled exception in thread started by Unhandled exception in
thread started by <bound method FrameLocEdit.GetThumbnail of
<locedit.FrameLocEdit; proxy of <Swig Object of type 'wxPanel *' at
0x4fb5300>
>>Traceback (most recent call last):<bound method
FrameLocEdit.GetThumbnail of <locedit.FrameLocEdit; proxy of <Swig
Object of type 'wxPanel *' at 0x4fb5300>
>>Traceback (most recent call last):<bound method
FrameLocEdit.GetThumbnail of <locedit.FrameLocEdit; proxy of <Swig
Object of type 'wxPanel *' at 0x4fb5300>
>>Traceback (most recent call last): File
"C:\Python\Projects\Warehouserclient_v3\locedit.py", line 917, in
GetThumbnail


Traceback (most recent call last):

File "C:\Python\Projects\Warehouserclient_v3\locedit.py", line 917,
in GetThumbnail
Traceback (most recent call last):
File "C:\Python\Projects\Warehouserclient_v3\locedit.py", line 917,
in GetThumbnail
File "C:\Python\Projects\Warehouserclient_v3\locedit.py", line
917, in GetThumbnail
File "C:\Python\Projects\Warehouserclient_v3\locedit.py", line
917, in GetThumbnail
self.Log(traceback.format_exc())
self.Log(traceback.format_exc())
self.Log(traceback.format_exc())
AttributeErrorself.Log(traceback.format_exc())
AttributeErrorself.Log(traceback.format_exc())
AttributeError: AttributeError: AttributeError:
C:\Python\Projects\Warehouserclient_v3>


And the last attributerror doesn't tell what attribute is missing.
Probably I'll have to use a different library (pycurl, for example). But
the error itself is getting more interesting.

Also tried to use an invalid file (that should return with HTTP 404 not
found) but the effect is exactly the same. Nothing is printed on stdout
until I try to close the program (stop wxPython's mainloop). Then all
previously threads throw an AttributeError and all of them print a stack
trace (at the same time, lines mixed up).

I'll be experimenting with pyCurl now.

Thanks,

Laszlo





John Nagle

unread,
Mar 20, 2012, 4:18:24 PM3/20/12
to
On 3/17/2012 9:34 AM, Chris Angelico wrote:
> 2012/3/18 Laszlo Nagy<gan...@shopzeus.com>:
>> In the later case, "log.txt" only contains "#1" and nothing else. If I look
>> at pythonw.exe from task manager, then its shows +1 thread every time I
>> click the button, and "#1" is appended to the file.

Does it fail to retrieve on all URLs, or only on some of them?

Running a web crawler, I've seen some pathological cases.
There are a very few sites that emit data very, very slowly,
but don't time out because they are making progress. There are
also some sites where attempting to negotiate a SSL connection
results in the SSL protocol reaching a point where the host end
is supposed to finish the handshake, but it doesn't.

The odds are against this being the problem. I see problems
like that in maybe 1 in 100,000 URLs.

John Nagle

Laszlo Nagy

unread,
Mar 20, 2012, 4:42:28 PM3/20/12
to pytho...@python.org

> I'll be experimenting with pyCurl now.
By replacing the GetThumbnail method with this brainless example, taken
from the pyCurl demo:


def GetThumbnail(self,imgurl):
class Test:
def __init__(self):
self.contents = ''

def body_callback(self, buf):
self.contents = self.contents + buf

self.Log("#1: "+repr(imgurl))
try:
t = Test()
c = pycurl.Curl()
c.setopt(c.URL, imgurl)
c.setopt(c.WRITEFUNCTION, t.body_callback)
self.Log("#2")
c.perform()
self.Log("#3")
c.close()
self.Log("#4")
fpath = os.path.join(os.environ["TEMP"],"thumbnail.jpg")
fout = open(fpath,"wb+")
self.Log("#5: "+repr(fpath))
try:
fout.write(t.contents)
finally:
fout.close()
self.Log("#6")
except:
self.Log(traceback.format_exc())
return
self.Log("#7")
wx.CallAfter(self.imgProduct.SetPage,"""<html><body><img
src="%s"></body></html>"""%fpath)
self.Log("#8")

Everything works perfectly, in all modes: console, no console, started
directly and started in separate thread.

So the problem with urllib must be. Maybe wxPython installs some except
hooks, or who knows? If somebody feels up to it, I can start narrowing
down the problem to the smallest possible application. But only if
someone knows how to debug core code because I don't. Otherwise I'll
just use pyCURL.

Thank you for your help!

Laszlo

Prasad, Ramit

unread,
Mar 20, 2012, 4:52:00 PM3/20/12
to pytho...@python.org
Maybe in self.Log you should add a sys.stdout.flush and
sys.stderr.flush(). I am not very familiar with stdin/out but
maybe it will help.
This makes me think self does not have a .Log() or the traceback
import is being overridden by something else that does not have
.format_exc(). Or possibly this is in a function that does not have a
self (maybe a typo in the function def?).

>
> Also tried to use an invalid file (that should return with HTTP 404 not
> found) but the effect is exactly the same. Nothing is printed on stdout
> until I try to close the program (stop wxPython's mainloop). Then all
> previously threads throw an AttributeError and all of them print a stack
> trace (at the same time, lines mixed up).
>
> I'll be experimenting with pyCurl now.


Ramit


Ramit Prasad | JPMorgan Chase Investment Bank | Currencies Technology
712 Main Street | Houston, TX 77002
work phone: 713 - 216 - 5423

--

This email is confidential and subject to important disclaimers and
conditions including on offers for the purchase or sale of
securities, accuracy and completeness of information, viruses,
confidentiality, legal privilege, and legal entity disclaimers,
available at http://www.jpmorgan.com/pages/disclosures/email.
Message has been deleted

Prasad, Ramit

unread,
Mar 20, 2012, 5:25:07 PM3/20/12
to pytho...@python.org

> > Everything works perfectly, in all modes: console, no console, started
> > directly and started in separate thread.
> >
> > So the problem with urllib must be. Maybe wxPython installs some except
> > hooks, or who knows? If somebody feels up to it, I can start narrowing
> > down the problem to the smallest possible application. But only if
> > someone knows how to debug core code because I don't. Otherwise I'll
> > just use pyCURL.
>
> Have you tried urllib2? Have you tried a small program without using wx?
>
> To be honest, I doubt the problem is wx or urllib as they are both fairly
> broadly used. Try to come up with an example that is as minimal as
> possible.
>
> >>> imgurl =
> "http://www.shopzeus.hu/thumbnail.php?width=200&image=pyramid/PP0830.jpg"
> >>> urllib.urlretrieve( imgurl )
> ('c:\\[...]\\tmpkhixgt.php', <httplib.HTTPMessage instance at 0x0F2D75A8>)
>
> And I have Windows 7 64 with Python 2.6.6 (32 bit) and wx installed.
>


Your program on ActiveState worked for me which tells me that it might be
a network or machine specific problem. You are missing an import which I
mentioned in another post. Fixing that should tell what the error you are
getting is; you would not be getting the AttributeError without some
other error first.

Prasad, Ramit

unread,
Mar 20, 2012, 5:26:51 PM3/20/12
to pytho...@python.org
> > Traceback (most recent call last):
> >
> > File "C:\Python\Projects\Warehouserclient_v3\locedit.py", line 917,
> > in GetThumbnail
> > Traceback (most recent call last):
> > File "C:\Python\Projects\Warehouserclient_v3\locedit.py", line 917,
> > in GetThumbnail
> > File "C:\Python\Projects\Warehouserclient_v3\locedit.py", line
> > 917, in GetThumbnail
> > File "C:\Python\Projects\Warehouserclient_v3\locedit.py", line
> > 917, in GetThumbnail
> > self.Log(traceback.format_exc())
> > self.Log(traceback.format_exc())
> > self.Log(traceback.format_exc())
> > AttributeErrorself.Log(traceback.format_exc())
> > AttributeErrorself.Log(traceback.format_exc())
> > AttributeError: AttributeError: AttributeError:
> > C:\Python\Projects\Warehouserclient_v3>
> >
> >
> > And the last attributerror doesn't tell what attribute is missing.
> > Probably I'll have to use a different library (pycurl, for example). But
> > the error itself is getting more interesting.
>
> This makes me think self does not have a .Log() or the traceback
> import is being overridden by something else that does not have
> .format_exc(). Or possibly this is in a function that does not have a
> self (maybe a typo in the function def?).


> Here you can find the example program and the original post.
>
> http://code.activestate.com/lists/python-list/617894/

I just looked at your source file on ActiveState and noticed that
you do not import traceback. That is why you are getting the
AttributeError. Now you should be getting a much better error
once you import it :)



Ramit


Ramit Prasad | JPMorgan Chase Investment Bank | Currencies Technology
712 Main Street | Houston, TX 77002
work phone: 713 - 216 - 5423

--


> > Also tried to use an invalid file (that should return with HTTP 404 not
> > found) but the effect is exactly the same. Nothing is printed on stdout
> > until I try to close the program (stop wxPython's mainloop). Then all
> > previously threads throw an AttributeError and all of them print a stack
> > trace (at the same time, lines mixed up).
> >
> > I'll be experimenting with pyCurl now.
>
>
> Ramit
>
>
> Ramit Prasad | JPMorgan Chase Investment Bank | Currencies Technology
> 712 Main Street | Houston, TX 77002
> work phone: 713 - 216 - 5423
>
> --
>
> This email is confidential and subject to important disclaimers and
> conditions including on offers for the purchase or sale of
> securities, accuracy and completeness of information, viruses,
> confidentiality, legal privilege, and legal entity disclaimers,
> available at http://www.jpmorgan.com/pages/disclosures/email.
> --
> http://mail.python.org/mailman/listinfo/python-list

Prasad, Ramit

unread,
Mar 20, 2012, 5:01:58 PM3/20/12
to pytho...@python.org
> Everything works perfectly, in all modes: console, no console, started
> directly and started in separate thread.
>
> So the problem with urllib must be. Maybe wxPython installs some except
> hooks, or who knows? If somebody feels up to it, I can start narrowing
> down the problem to the smallest possible application. But only if
> someone knows how to debug core code because I don't. Otherwise I'll
> just use pyCURL.

Have you tried urllib2? Have you tried a small program without using wx?

To be honest, I doubt the problem is wx or urllib as they are both fairly
broadly used. Try to come up with an example that is as minimal as possible.

>>> imgurl = "http://www.shopzeus.hu/thumbnail.php?width=200&image=pyramid/PP0830.jpg"
>>> urllib.urlretrieve( imgurl )
('c:\\[...]\\tmpkhixgt.php', <httplib.HTTPMessage instance at 0x0F2D75A8>)

And I have Windows 7 64 with Python 2.6.6 (32 bit) and wx installed.

Laszlo Nagy

unread,
Mar 21, 2012, 8:38:10 AM3/21/12
to pytho...@python.org
On 2012-03-20 22:26, Prasad, Ramit wrote:
> I just looked at your source file on ActiveState and noticed that
> you do not import traceback. That is why you are getting the
> AttributeError. Now you should be getting a much better error
> once you import it:)
Nope. That would result in a NameError. After adding "import traceback",
I still get several AttributeError messages. The traceback should
contain the exact line number, and a description about what object is
missing what attribute anyway. My code is pure Python, and under no
circumstances should it be able to start a blocked call for a system
library function.

Prasad, Ramit

unread,
Mar 22, 2012, 11:25:04 AM3/22/12
to pytho...@python.org
Your code works for me, so the problem should be your system
and/or network. Try a different Python version? I tested using 2.6.6.
Also, check your proxy or firewall. If you are using Python 2.x
try using urllib2.

Ramit


Ramit Prasad | JPMorgan Chase Investment Bank | Currencies Technology
712 Main Street | Houston, TX 77002
work phone: 713 - 216 - 5423

0 new messages