This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author roger.serwy
Recipients roger.serwy, terry.reedy
Date 2012-12-07.01:46:14
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1354844775.58.0.855877358898.issue16630@psf.upfronthosting.co.za>
In-reply-to
Content
The calltip fails if __getattr__ raises an exception. Take as an example:


Python 3.4.0a0 (default:0238cc842805+, Dec  6 2012, 19:17:04) 
[GCC 4.7.2] on linux
Type "copyright", "credits" or "license()" for more information.
>>> class Test:
	def __getattr__(self, name):
		raise Exception()

	
>>> a = Test()
>>> a(

This traceback is sent to stderr:

Exception in Tkinter callback
Traceback (most recent call last):
  File "/home/serwy/Code/python/cpython/Lib/tkinter/__init__.py", line 1442, in __call__
    return self.func(*args)
  File "/home/serwy/Code/python/cpython/Lib/idlelib/MultiCall.py", line 166, in handler
    r = l[i](event)
  File "/home/serwy/Code/python/cpython/Lib/idlelib/CallTips.py", line 56, in try_open_calltip_event
    self.open_calltip(False)
  File "/home/serwy/Code/python/cpython/Lib/idlelib/CallTips.py", line 75, in open_calltip
    argspec = self.fetch_tip(expression)
  File "/home/serwy/Code/python/cpython/Lib/idlelib/CallTips.py", line 101, in fetch_tip
    (expression,), {})
  File "/home/serwy/Code/python/cpython/Lib/idlelib/rpc.py", line 216, in remotecall
    return self.asyncreturn(seq)
  File "/home/serwy/Code/python/cpython/Lib/idlelib/rpc.py", line 247, in asyncreturn
    return self.decoderesponse(response)
  File "/home/serwy/Code/python/cpython/Lib/idlelib/rpc.py", line 267, in decoderesponse
    raise what
Exception


The attached patch fixes the issue.
History
Date User Action Args
2012-12-07 01:46:15roger.serwysetrecipients: + roger.serwy, terry.reedy
2012-12-07 01:46:15roger.serwysetmessageid: <1354844775.58.0.855877358898.issue16630@psf.upfronthosting.co.za>
2012-12-07 01:46:15roger.serwylinkissue16630 messages
2012-12-07 01:46:14roger.serwycreate