Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #21955

RE: urllib.urlretrieve never returns??? [SOLVED] - workaround

From "Prasad, Ramit" <ramit.prasad@jpmorgan.com>
Subject RE: urllib.urlretrieve never returns??? [SOLVED] - workaround
Date 2012-03-20 21:25 +0000
References (3 earlier) <mailman.815.1332185597.3037.python-list@python.org> <4f67c09b$0$29981$c3e8da3$5496439d@news.astraweb.com> <4F682CDC.5000703@shopzeus.com> <4F68E49C.2060000@shopzeus.com> <4F68EBB4.6060606@shopzeus.com>
Newsgroups comp.lang.python
Message-ID <mailman.847.1332278736.3037.python-list@python.org> (permalink)

Show all headers | View raw


> > 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.

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.  

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: urllib.urlretrieve never returns??? Laszlo Nagy <gandalf@shopzeus.com> - 2012-03-19 20:32 +0100
  Re: urllib.urlretrieve never returns??? Jon Clements <joncle@googlemail.com> - 2012-03-19 16:04 -0700
  Re: urllib.urlretrieve never returns??? Jon Clements <joncle@googlemail.com> - 2012-03-19 16:04 -0700
  Re: urllib.urlretrieve never returns??? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-03-19 23:26 +0000
    Re: urllib.urlretrieve never returns??? Laszlo Nagy <gandalf@shopzeus.com> - 2012-03-20 08:08 +0100
    Re: urllib.urlretrieve never returns??? Laszlo Nagy <gandalf@shopzeus.com> - 2012-03-20 21:12 +0100
    Re: urllib.urlretrieve never returns??? [SOLVED] - workaround Laszlo Nagy <gandalf@shopzeus.com> - 2012-03-20 21:42 +0100
    RE: urllib.urlretrieve never returns??? "Prasad, Ramit" <ramit.prasad@jpmorgan.com> - 2012-03-20 20:52 +0000
    Re: urllib.urlretrieve never returns??? Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2012-03-20 17:14 -0400
    RE: urllib.urlretrieve never returns??? [SOLVED] - workaround "Prasad, Ramit" <ramit.prasad@jpmorgan.com> - 2012-03-20 21:25 +0000
    RE: urllib.urlretrieve never returns??? "Prasad, Ramit" <ramit.prasad@jpmorgan.com> - 2012-03-20 21:26 +0000
    RE: urllib.urlretrieve never returns??? [SOLVED] - workaround "Prasad, Ramit" <ramit.prasad@jpmorgan.com> - 2012-03-20 21:01 +0000
    Re: urllib.urlretrieve never returns??? Laszlo Nagy <gandalf@shopzeus.com> - 2012-03-21 13:38 +0100
    RE: urllib.urlretrieve never returns??? "Prasad, Ramit" <ramit.prasad@jpmorgan.com> - 2012-03-22 15:25 +0000

csiph-web