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

Sorting Variable explorer gives a traceback #1891

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

Sorting Variable explorer gives a traceback #1891

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

Comments

@spyder-bot
Copy link
Collaborator

From VanBoxem...@gmail.com on 2014-07-16T02:55:20Z

Spyder Version: 2.3.0beta2
Python Version: 3.3.5
Qt Version : 4.8.4, PyQt4 (API v2) 4.9.6 on Windows
pyflakes >=0.6.0: None (OK)
pep8 >=0.6 : None (NOK)
IPython >=0.13 : 2.0.0 (OK)
rope >=0.9.2 : 0.9.4 (OK)
sphinx >=0.6.6 : 1.2.2 (OK)
matplotlib >=1.0: 1.3.1 (OK)
sympy >=0.7.0 : 0.7.5 (OK)
pylint >=0.25 : 1.1.0 (OK)

What steps will reproduce the problem?

  1. run simple script creating variables, e.g. attached one.
    1. run in new python instance, keeping interpreter open to interact with afterwards
    2. click on any column header in the variable explorer to sort variables
    3. See this error pop up:
      Inspect Spyder internals:
      spy.app, spy.window, dir(spy)

      Traceback (most recent call last):
      File "C:\WinPython-64bit-3.3.5.0\python-3.3.5.amd64\lib\site-packages\spyderlib\widgets\dicteditor.py", line 187, in sort
      self.sizes = sort_against(self.sizes, self.types, reverse)
      File "C:\WinPython-64bit-3.3.5.0\python-3.3.5.amd64\lib\site-packages\spyderlib\widgets\dicteditorutils.py", line 125, in sort_against
      return [item for _, item in sorted(zip(listb, lista), reverse=reverse)]
      TypeError: unorderable types: tuple() < int()
      Traceback (most recent call last):
      File "C:\WinPython-64bit-3.3.5.0\python-3.3.5.amd64\lib\site-packages\spyderlib\widgets\dicteditor.py", line 187, in sort
      self.sizes = sort_against(self.sizes, self.types, reverse)
      File "C:\WinPython-64bit-3.3.5.0\python-3.3.5.amd64\lib\site-packages\spyderlib\widgets\dicteditorutils.py", line 125, in sort_against
      return [item for _, item in sorted(zip(listb, lista), reverse=reverse)]
      TypeError: unorderable types: tuple() < int()

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

It shouldn't crash. I need to restart Spyder because the console window is completely borked.

Attachment: test.py

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

@spyder-bot
Copy link
Collaborator Author

From ccordoba12 on 2014-08-25T00:06:47Z

Thanks for reporting, we'll try to fix this error in a future version.

Summary: Sorting Variable explorer gives a traceback (was: sorting Variabel explorer empties view and crashes internal console)
Labels: Cat-VariableExplorer MS-v2.3.2

@spyder-bot
Copy link
Collaborator Author

From ccordoba12 on 2014-09-21T11:02:13Z

I think this only requires to put a try/except in the right place to solve it.

Labels: Easy

@spyder-bot
Copy link
Collaborator Author

From ccordoba12 on 2014-10-26T10:24:25Z

Labels: -Priority-Medium Priority-Critical

@spyder-bot
Copy link
Collaborator Author

From ccordoba12 on 2014-11-02T12:54:16Z

This issue was closed by revision bec654432e8b .

Status: Fixed

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