Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calltip traceback while using Jedi #1850

Closed
spyder-bot opened this issue Feb 17, 2015 · 8 comments
Closed

Calltip traceback while using Jedi #1850

spyder-bot opened this issue Feb 17, 2015 · 8 comments

Comments

@spyder-bot
Copy link
Collaborator

From contrebasse on 2014-06-16T07:40:36Z

Spyder Version: 2.3.0rc (3722: r5420c4859aaf )
Python Version: 2.7.6
Qt Version : 4.8.5, PyQt4 (API v2) 4.10.4 on Linux
IPython >=0.13 : 2.0.0 (OK)
pyflakes >=0.5.0: 0.5.0 (OK)
pep8 >=0.6 : 1.4.6 (OK)
pygments >=1.6 : 1.6 (OK)
sphinx >=0.6.6 : 1.2.2 (OK)
psutil >=0.3 : 2.1.1 (OK)
jedi >=0.8.0 : 0.8.0-final0 (OK)
matplotlib >=1.0: 1.3.1 (OK)
sympy >=0.7.0 : 0.7.5 (OK)
pylint >=0.25 : 1.2.1 (OK)

What steps will reproduce the problem?

No idea, I just noticed a traceback in the internal console.

What is the expected output? What do you see instead?

I saw nothing wrong in the editor, only the following traceback in the internal console:
Traceback (most recent call last):
File "/data/prog/spyderlib/spyderlib/widgets/editor.py", line 467, in show_object_info
at_position=position)
File "/data/prog/spyderlib/spyderlib/widgets/mixins.py", line 108, in show_calltip
self.calltip_widget.show_tip(point, tiptext, wrapped_textlines)
File "/data/prog/spyderlib/spyderlib/widgets/calltip.py", line 163, in show_tip
args = wrapped_tiplines[0].split('(')[1]
IndexError: list index out of range

Please provide any additional information below

.

Original issue: http://code.google.com/p/spyderlib/issues/detail?id=1850

@spyder-bot spyder-bot added this to the v2.4 milestone Feb 17, 2015
@spyder-bot
Copy link
Collaborator Author

From contrebasse on 2014-06-25T02:02:55Z

I found how to reproduce it. In a new file, type:

class Foo(

@spyder-bot
Copy link
Collaborator Author

From ccordoba12 on 2014-06-27T10:40:31Z

Great! It happens with both jedi and rope or just with jedi?

@-steven: Could you take a look at it, given that you are our code completion expert? :)

Summary: Calltip traceback (was: calltip traceback)
Cc: [email protected]
Labels: MS-v2.3.1

@spyder-bot
Copy link
Collaborator Author

From [email protected] on 2014-06-27T18:46:05Z

This actually happens for any class or function definition now. The value of "signature" ends up being the name of the file. The easiest way to fix was to do this:

diff -r 322acad67d8c spyderlib/widgets/editor.py
--- a/spyderlib/widgets/editor.py Mon Jun 23 15:36:47 2014 -0500
+++ b/spyderlib/widgets/editor.py Fri Jun 27 20:43:52 2014 -0500
@@ -457,8 +457,11 @@
"send_to_inspector(QString,QString,QString,QString,bool)"),
obj_fullname, '', '', '', not auto)
if signature:

  •        try:
         self.editor.show_calltip('Arguments', signature, signature=True,
                                  at_position=position)
    
  •        except IndexError:
    
  •            pass
    

    def go_to_definition(self, position, regex=False):
    """Go to definition"""

@spyder-bot
Copy link
Collaborator Author

From [email protected] on 2014-06-27T19:07:09Z

Whoops, this only occurs with jedi. I assume @-contrebasse pulled jedi_plugin.py from my PR. I updated the PR to fix this in jedi_plugin.py. The above fix is no longer necessary.

@spyder-bot
Copy link
Collaborator Author

From contrebasse on 2014-06-30T15:43:53Z

Yes, I pulled your jedi branch, sorry. I should have checked with the default branch first...

@spyder-bot
Copy link
Collaborator Author

From contrebasse on 2014-07-02T07:11:55Z

This one can be closed, it is the wrong branch and is fixed in the PR.

@spyder-bot
Copy link
Collaborator Author

From ccordoba12 on 2014-07-02T08:05:07Z

Well, we're living in the future :) This is the first bug fixed for 2.3.1 without having released 2.3!

Summary: Calltip traceback while using Jedi (was: Calltip traceback)
Status: Fixed

@spyder-bot
Copy link
Collaborator Author

From ccordoba12 on 2014-07-15T15:18:59Z

Labels: -MS-v2.3.1 MS-v2.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant