conda update spyder
(or pip
, if not using Anaconda)jupyter qtconsole
(if console-related)spyder --reset
When I remap Shift+Enter to run selection, and apply the changes, it does nothing when I press Shift+Enter rather than either run the selection or run all the code.
spyder: 4.0.1
spyder-kernel: 1.8.1
Operating System: OSX Catalina 10.15.3 (19D76)
PyQt5: 5.12.3
I expect it to run selection; instead it does nothing
PASTE TRACEBACK HERE
PASTE DEPENDENCIES HERE
I can reproduce this. If I make the changes with spyder running and try to use it I get an Qt message on the Internal console
(QAction ambiguous shortcut or similar I forgot)
If I restart it works as expected.
Please take a look at this @steff456
I cannot reproduce on Windows on latest master.
But it seems an issue on 4.x (i didnot check master)
But it seems an issue on 4.x (i didnot check master)
On latest 4.x I cannot reproduce also.
Same Qt version? (Maybe it is an OSX issue)
@impact27 could you test if you can reproduce?
Same Qt version? (Maybe it is an OSX issue)
@impact27 could you test if you can reproduce?
No, I run Spyder on Python 3.7.3 64-bit | Qt 5.9.6 | PyQt5 5.9.2 | Windows 10
PyQt 5.12.* is not available in Anaconda, so I cannot test under that version of PyQt easily unfortunately.
@impact27 could you test if you can reproduce?
I can reproduce, I can't run selection from a keyboard shortcut.
Futhermore, the internal console prints when I try to use the shortcut:
QAction::event: Ambiguous shortcut overload: ??
And if I change to maj + R:
QAction::event: Ambiguous shortcut overload: ?R
No, I run Spyder on Python 3.7.3 64-bit | Qt 5.9.6 | PyQt5 5.9.2 | Windows 10
PyQt 5.12.* is not available in Anaconda, so I cannot test under that version of PyQt easily unfortunately.
@jnsebgosselin you could use conda forge
conda create --name spyder-test spyder=4 --channel conda-forge
So the problem occurs no matter the shortcut you are using for Run selection
?
Possible solution to this problem would be to set the context of the run actions to Qt.WidgetWithChildrenShortcut
here :
Also, I think that the run_cell_action
, run_cell_advance_action
and debug_cell_action
actions should be registered with register_shortcut
here, because they are currently not updated during runtime, only after a restart :
@steff456 please fix this with @jnsebgosselin suggestions
@steff456 please fix this with @jnsebgosselin suggestions
Since I can't test it, I don't know if this is going to fix the issue here. I'm just proposing stuff to try... :P
No, I run Spyder on Python 3.7.3 64-bit | Qt 5.9.6 | PyQt5 5.9.2 | Windows 10
PyQt 5.12.* is not available in Anaconda, so I cannot test under that version of PyQt easily unfortunately.@jnsebgosselin you could use conda forge
conda create --name spyder-test spyder=4 --channel conda-forge
Thanks!
Also, I think that the
run_cell_action
,run_cell_advance_action
anddebug_cell_action
actions should be registered withregister_shortcut
here, because they are currently not updated during runtime, only after a restart :
The shortcut indeed works after a restart
Since I can't test it, I don't know if this is going to fix the issue here. I'm just proposing stuff to try... :P
Thanks @jnsebgosselin! It worked perfectly :)
Most helpful comment
Thanks @jnsebgosselin! It worked perfectly :)