Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #21956
| From | "Prasad, Ramit" <ramit.prasad@jpmorgan.com> |
|---|---|
| Subject | RE: urllib.urlretrieve never returns??? |
| Date | 2012-03-20 21:26 +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> <5B80DD153D7D744689F57F4FB69AF474026C4BD8@SCACMX008.exchad.jpmchase.net> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.848.1332278837.3037.python-list@python.org> (permalink) |
> > 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 | Next — Previous in thread | Next in thread | Find similar | Unroll 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