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

VSCode issues #466

Closed
nickeubank opened this issue Jun 18, 2021 · 11 comments
Closed

VSCode issues #466

nickeubank opened this issue Jun 18, 2021 · 11 comments

Comments

@nickeubank
Copy link

Hey All!

When I have open a jupyter interactive console, I seem unable to get the usual VSCode operations to work. For example bar switch generates this:

[The below error was raised while handling the above exception(s)]
2021-06-18 16:39:35 ERROR cb error topic="phrase" cb=<bound method SpeechSystem.engine_event of <talon.scripting.speech_system.SpeechSystem object at 0x10b4b6ae0>>
   29:       lib/python3.9/threading.py:912* # cron thread
   28:       lib/python3.9/threading.py:954* 
   27:       lib/python3.9/threading.py:892* 
   26:                    talon/cron.py:145| 
   25:                    talon/cron.py:102| 
   24:          talon/scripting/rctx.py:233| # 'cron' talon_plugins.engines.dragon:<lambda>()
   23:      talon/scripting/dispatch.py:99 | 
   22:      talon/scripting/dispatch.py:105| 
   21:      talon/scripting/dispatch.py:144| 
   20:      talon/scripting/dispatch.py:133| 
   19:          talon/scripting/rctx.py:233| # 'phrase' main:_redispatch()
   18: talon/scripting/speech_system.py:61 | 
   17:      talon/scripting/dispatch.py:105| 
   16:      talon/scripting/dispatch.py:144| 
   15:      talon/scripting/dispatch.py:133| 
   14: ------------------------------------# cron thread
   13:          talon/scripting/rctx.py:233| # 'phrase' main:engine_event()
   12: talon/scripting/speech_system.py:374| 
   11:       talon/scripting/actions.py:75 | 
   10:         talon/scripting/types.py:366| 
    9:     talon/scripting/core/core.py:100| 
    8:       talon/scripting/actions.py:75 | 
    7:         talon/scripting/types.py:366| 
    6:     talon/scripting/core/core.py:131| 
    5:       talon/scripting/actions.py:75 | 
    4:         talon/scripting/types.py:366| 
    3:     talon/scripting/core/core.py:136| 
    2:  talon/scripting/talon_script.py:691| 
    1:  talon/scripting/talon_script.py:594| 
talon.scripting.talon_script.TalonScriptError: 
 in script at /Users/Nick/.talon/user/knausj_talon/apps/vscode/vscode.talon:66:
 > user.vscode('workbench.action.toggleSidebarVisibility')
Exception: This editor is not active

Any suggestions?

macOS, if that helps

@nickeubank
Copy link
Author

And... now it works. OK, so very intermittent. Will dig in more...

@pokey
Copy link
Collaborator

pokey commented Jun 19, 2021

There is code in the VSCode extension that tries to prevent the wrong instance of VSCode from trying to execute the given command. However, there seems to be an intermittent bug in VSCode's determination of which editor is active.

How often is this issue occurring?

@nickeubank
Copy link
Author

Pretty frequently for me unfortunately -- at least half the time it seems. Know of any behavioral changes I can make to prevent it?

@pokey
Copy link
Collaborator

pokey commented Jun 20, 2021

I can add an option to disable that check. The scenario it protects against is pretty unlikely

@nickeubank
Copy link
Author

nickeubank commented Jun 20, 2021 via email

@pokey
Copy link
Collaborator

pokey commented Jun 21, 2021

Ok @nickeubank you can now disable the command-server.backgroundWindowProtection setting as described here. Lmk if that works and I'll close the issue

@nickeubank
Copy link
Author

Thanks so much! I'll report back after playing around for a while.

@pokey
Copy link
Collaborator

pokey commented Jun 22, 2021

Fwiw I have now disabled the background window protection by default, so you should just be able to upgrade your command-server extension

@nickeubank
Copy link
Author

Hmmm.... still running into intermediate problems, though error looks different now:

[The below error was raised while handling the above exception(s)]
2021-06-25 13:42:47 ERROR cb error topic="phrase" cb=<bound method SpeechSystem.engine_event of <talon.scripting.speech_system.SpeechSystem object at 0x113c02cc0>>
   29:       lib/python3.9/threading.py:912* # cron thread
   28:       lib/python3.9/threading.py:954* 
   27:       lib/python3.9/threading.py:892* 
   26:                    talon/cron.py:145| 
   25:                    talon/cron.py:102| 
   24:          talon/scripting/rctx.py:233| # 'cron' talon_plugins.engines.dragon:<lambda>()
   23:      talon/scripting/dispatch.py:99 | 
   22:      talon/scripting/dispatch.py:105| 
   21:      talon/scripting/dispatch.py:144| 
   20:      talon/scripting/dispatch.py:133| 
   19:          talon/scripting/rctx.py:233| # 'phrase' main:_redispatch()
   18: talon/scripting/speech_system.py:61 | 
   17:      talon/scripting/dispatch.py:105| 
   16:      talon/scripting/dispatch.py:144| 
   15:      talon/scripting/dispatch.py:133| 
   14: ------------------------------------# cron thread
   13:          talon/scripting/rctx.py:233| # 'phrase' main:engine_event()
   12: talon/scripting/speech_system.py:374| 
   11:       talon/scripting/actions.py:75 | 
   10:         talon/scripting/types.py:366| 
    9:     talon/scripting/core/core.py:100| 
    8:       talon/scripting/actions.py:75 | 
    7:         talon/scripting/types.py:366| 
    6:     talon/scripting/core/core.py:131| 
    5:       talon/scripting/actions.py:75 | 
    4:         talon/scripting/types.py:366| 
    3:     talon/scripting/core/core.py:136| 
    2:  talon/scripting/talon_script.py:691| 
    1:  talon/scripting/talon_script.py:594| 
talon.scripting.talon_script.TalonScriptError: 
 in script at /Users/Nick/.talon/user/knausj_talon/apps/vscode/vscode.talon:66:
 > user.vscode('workbench.action.toggleSidebarVisibility')
Exception: Found recent request file; vscode is probably hung
2021-06-25 13:42:48 WARNING actions: skipped because they have no matching declaration: (app.window_save)
2021-06-25 13:42:49 WARNING actions: skipped because they have no matching declaration: (app.window_save)

@pokey
Copy link
Collaborator

pokey commented Jun 26, 2021

Hmm that shouldn't be happening anymore. Try merging latest knausj and lmk if that fixes it

@nickeubank
Copy link
Author

OK, rebasing with knausj again seems to be helping a lot, thanks! I'll close!

Thanks so much!

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

No branches or pull requests

2 participants