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

Removal of keyboard shortcut causes errors to be thrown #2125

Closed
spyder-bot opened this issue Feb 17, 2015 · 2 comments · Fixed by #2367
Closed

Removal of keyboard shortcut causes errors to be thrown #2125

spyder-bot opened this issue Feb 17, 2015 · 2 comments · Fixed by #2367

Comments

@spyder-bot
Copy link
Collaborator

From thevp...@gmail.com on 2015-01-20T23:56:05Z

Spyder Version: 2.3.2
Python Version: 3.4.1
Qt Version : 4.8.6, PyQt4 (API v2) 4.10.4 on Windows
pyflakes >=0.6.0: 0.8.1 (OK)
pep8 >=0.6 : 1.5.7 (OK)
IPython >=0.13 : 2.3.1 (OK)
zmq >=2.1.11 : 14.4.1 (OK)
pygments >=1.6 : 2.0.1 (OK)
pandas >=0.13.1 : 0.14.0 (OK)
sphinx >=0.6.6 : 1.2.3 (OK)
rope >=0.9.2 : 0.9.4-1 (OK)
matplotlib >=1.0: 1.4.2 (OK)
sympy >=0.7.0 : 0.7.5 (OK)
pylint >=0.25 : 1.4.0 (OK)

What steps will reproduce the problem?

  1. Go to Keyboard Shortcuts (Tools -> Preferences --> Keyboard Shortcuts)
  2. Pick a shortcut of your choice and select the blank value for all shortcut modifiers
  3. Double-click on "Key" column for that shortcut, and select a random character.
  4. Press "OK", and verify that the shortcut has been "removed" by checking the menus (In my case, I first tested the removal of the shortcut for "Quit", and the character I chose was "0". The option under File-->Quit showed that there was no shortcut to that command.)

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

An error message should pop-up, stating that this is an invalid choice. Or, the command item should be removed completely. However, Spyder accepts the options but starts throwing errors and becomes unstable, throwing errors described in the section below. Also, at this point, I cannot re-define the shortcut - any choices made will be cleared as soon as another box is pressed. Only way to make things stable again is to press "restore keyboard shortcuts".

Please provide any additional information below

Errors produced in console after the problem is created and the Keyboard Shortcuts menu is opened in the Preferences window.

AttributeError: 'int' object has no attribute 'modifiers'
'int' object has no attribute 'modifiers'
Traceback (most recent call last):
  File "C:\Anaconda3\lib\site-packages\spyderlib\plugins\shortcuts.py", line 158, in data
    return to_qvariant(Key.MODIFIERNAMES[key.modifiers[0]])
AttributeError: 'int' object has no attribute 'modifiers'
Traceback (most recent call last):
  File "C:\Anaconda3\lib\site-packages\spyderlib\plugins\shortcuts.py", line 160, in data
    return to_qvariant(Key.MODIFIERNAMES[key.modifiers[1]])
AttributeError: 'int' object has no attribute 'modifiers'
Traceback (most recent call last):
  File "C:\Anaconda3\lib\site-packages\spyderlib\plugins\shortcuts.py", line 162, in data
    return to_qvariant(Key.MODIFIERNAMES[key.modifiers[2]])
AttributeError: 'int' object has no attribute 'modifiers'
Traceback (most recent call last):
  File "C:\Anaconda3\lib\site-packages\spyderlib\plugins\shortcuts.py", line 164, in data
    return to_qvariant(Key.KEYS[key.key])
AttributeError: 'int' object has no attribute 'key'

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

@spyder-bot
Copy link
Collaborator Author

From ccordoba12 on 2015-01-30T14:04:00Z

Labels: MS-v2.3.4 Cat-Settings

@ccordoba12
Copy link
Member

Just for you to notice it @blink1073 :-)

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

Successfully merging a pull request may close this issue.

3 participants