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


Groups > comp.lang.python > #21956

RE: urllib.urlretrieve never returns???

Path csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <ramit.prasad@jpmorgan.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.000
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; '(at': 0.03; 'completeness': 0.05; 'attribute': 0.07; 'threads,': 0.07; 'overridden': 0.09; 'pil.': 0.09; 'throw': 0.09; 'url:activestate': 0.09; 'exception': 0.12; 'message-----': 0.12; 'library': 0.13; 'to:name:python-list@python.org': 0.15; '404': 0.16; '712': 0.16; 'currencies': 0.16; 'disclaimers': 0.16; 'disclaimers,': 0.16; 'example).': 0.16; 'from:addr:jpmorgan.com': 0.16; 'received:155.180': 0.16; 'received:159.53': 0.16; 'received:exchad.jpmchase.net': 0.16; 'received:jpmchase.com': 0.16; 'received:jpmchase.net': 0.16; 'securities,': 0.16; 'stdout': 0.16; 'threading,': 0.16; 'traceback.': 0.16; 'typo': 0.16; 'unhandled': 0.16; 'up:': 0.16; 'url:disclosures': 0.16; 'url:jpmorgan': 0.16; 'looked': 0.16; 'interesting.': 0.18; 'trace': 0.18; 'help.': 0.19; 'previously': 0.19; 'possibly': 0.19; '(most': 0.21; 'maybe': 0.21; "doesn't": 0.22; 'header:In- Reply-To:1': 0.22; 'stack': 0.24; 'times,': 0.24; 'traceback': 0.24; 'noticed': 0.26; 'url:mailman': 0.27; 'function': 0.27; 'import': 0.27; 'tried': 0.27; 'received:169': 0.28; 'received:169.254': 0.28; 'url:code': 0.28; 'effect': 0.28; 'invalid': 0.28; 'subject:skip:u 10': 0.29; 'example': 0.29; 'print': 0.29; 'lines': 0.30; '(maybe': 0.30; 'received:155': 0.30; 'received:159': 0.30; 'threads': 0.30; "didn't": 0.30; 'error': 0.30; 'url:listinfo': 0.32; 'source': 0.32; 'accuracy': 0.32; 'thread': 0.32; 'does': 0.32; 'familiar': 0.32; 'object': 0.33; 'file': 0.34; 'calling': 0.34; 'last):': 0.34; 'probably': 0.35; 'to:addr:python-list': 0.35; 'however,': 0.35; 'phone:': 0.35; 'something': 0.35; 'subject:': 0.35; 'url:python': 0.35; 'install': 0.35; 'before.': 0.37; 'http': 0.37; 'skip:p 50': 0.37; 'suddenly': 0.37; 'but': 0.37; 'charset:us-ascii': 0.37; 'using': 0.37; "i'll": 0.38; 'think': 0.38; 'getting': 0.38; 'should': 0.38; 'sent:': 0.38; 'same.': 0.39; 'url:org': 0.39; 'from:': 0.40; 'missing': 0.40; 'being': 0.40; 'to:addr:python.org': 0.40; 'type': 0.61; 'more': 0.61; 'your': 0.61; 'march': 0.61; 'subject': 0.61; 'offers': 0.62; 'here': 0.64; 'information,': 0.69; 'today': 0.70; 'legal': 0.72; 'url:email': 0.72; 'bank': 0.75; 'sale': 0.75; 'investment': 0.77; 'click': 0.78; 'purchase': 0.78; 'received:169.254.8': 0.84; 'absolutely': 0.98
X-DKIM OpenDKIM Filter v2.1.3 sf2.jpmchase.com q2KLREcY014472
DKIM-Signature v=1; a=rsa-sha256; c=simple/simple; d=jpmorgan.com; s=smtpout; t=1332278834; bh=U04hI1fiVXE+eyFQYIFJS0fhHyofzUFXhMlB8ZqJjRM=; h=From:To:Subject:Date:Message-ID:References:In-Reply-To: Content-Type:Content-Transfer-Encoding:MIME-Version; b=Oeb+ZzDHRCPEeee4xPuRRI2LOYJZ7fkd5tzfa1rXY/KbfY7DEx1KLq4rdEzw9w/Jc XxdLAIx5vK+f1z1QOmCtMVrKZFiHj7SkOCm/7Tc3XLW4ArGPn3m8Kg7+5ij9fTkQ6Z sI35kMHMglX1OUqAAo3fI5kcbQYQBr7Y9cZjVBlg=
From "Prasad, Ramit" <ramit.prasad@jpmorgan.com>
To "python-list@python.org" <python-list@python.org>
Subject RE: urllib.urlretrieve never returns???
Thread-Topic urllib.urlretrieve never returns???
Thread-Index AQHNBtXOjTMrLvbWA0uhAh24rmbgNZZzoKaQgAAO9JA=
Date Tue, 20 Mar 2012 21:26:51 +0000
References <4F649BFC.1080601@shopzeus.com> <jk2khh$e36$1@dough.gmane.org> <4F66E687.2050008@shopzeus.com> <mailman.815.1332185597.3037.python-list@python.org> <4f67c09b$0$29981$c3e8da3$5496439d@news.astraweb.com> <4F682CDC.5000703@shopzeus.com> <4F68E49C.2060000@shopzeus.com> <5B80DD153D7D744689F57F4FB69AF474026C4BD8@SCACMX008.exchad.jpmchase.net>
In-Reply-To <5B80DD153D7D744689F57F4FB69AF474026C4BD8@SCACMX008.exchad.jpmchase.net>
Accept-Language en-US
Content-Language en-US
X-MS-Has-Attach
X-MS-TNEF-Correlator
x-originating-ip [10.67.79.38]
Content-Type text/plain; charset="us-ascii"
Content-Transfer-Encoding quoted-printable
MIME-Version 1.0
X-DLP-FWD Yes
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.12
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.848.1332278837.3037.python-list@python.org> (permalink)
Lines 161
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1332278837 news.xs4all.nl 6875 [2001:888:2000:d::a6]:59921
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:21956

Show key headers only | View raw


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

--


> -----Original Message-----
> From: python-list-bounces+ramit.prasad=jpmorgan.com@python.org
> [mailto:python-list-bounces+ramit.prasad=jpmorgan.com@python.org] On Behalf
> Of Prasad, Ramit
> Sent: Tuesday, March 20, 2012 3:52 PM
> To: python-list@python.org
> Subject: RE: urllib.urlretrieve never returns???
> 
> > 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:
> >
> 
> 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.
> 
> > 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
> >
> >
> 
> >
> > 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

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