Repository navigation
Closed
Labels
talonRelated to cursorless-talon
Description
Talon: v0.2.0-305-g968a (305)
Knausj: 3e57e0165257cf07b0e21880d44a91e79cb3ef16
pokey/talon: 0.2.0
pokey/parse-tree: 0.14.0
pokey/cursorless: 0.25.271
2022-02-02 20:55:56 DEBUG User modules loaded at 1.6050s
2022-02-02 20:55:57 IO dired-mode
2022-02-02 20:55:58 INFO (SpeechSystem) Activating speech engine: W2lEngine(fast Conformer b108 (2021-09-15))
2022-02-02 20:55:58 IO Error finding color enablement; falling back to full enablement
2022-02-02 20:55:58 IO Traceback (most recent call last):
2022-02-02 20:55:58 IO File "/home/nixos/.talon/user/cursorless-talon/src/marks/vscode_settings.py", line 59, in vscode_get_setting_with_fallback
return actions.user.vscode_get_setting(key, default_value), False
2022-02-02 20:55:58 IO File "talon/scripting/actions.py", line 78, in __call__
2022-02-02 20:55:58 IO File "talon/scripting/types.py", line 383, in call
2022-02-02 20:55:58 IO File "/home/nixos/.talon/user/cursorless-talon/src/marks/vscode_settings.py", line 33, in vscode_get_setting
path: Path = actions.user.vscode_settings_path()
2022-02-02 20:55:58 IO File "talon/scripting/actions.py", line 78, in __call__
2022-02-02 20:55:58 IO File "talon/scripting/types.py", line 383, in call
2022-02-02 20:55:58 IO File "/home/nixos/.talon/user/cursorless-talon/src/marks/vscode_settings.py", line 89, in vscode_settings_path
return pick_path(
2022-02-02 20:55:58 IO File "/home/nixos/.talon/user/cursorless-talon/src/marks/vscode_settings.py", line 68, in pick_path
return max(existing_paths, key=lambda path: path.stat().st_mtime)
2022-02-02 20:55:58 IO ValueError: max() arg is an empty sequence
2022-02-02 20:55:58 IO Error finding shape enablement; falling back to full enablement
2022-02-02 20:55:58 IO Traceback (most recent call last):
2022-02-02 20:55:58 IO File "/home/nixos/.talon/user/cursorless-talon/src/marks/vscode_settings.py", line 59, in vscode_get_setting_with_fallback
return actions.user.vscode_get_setting(key, default_value), False
2022-02-02 20:55:58 IO File "talon/scripting/actions.py", line 78, in __call__
2022-02-02 20:55:58 IO File "talon/scripting/types.py", line 383, in call
2022-02-02 20:55:58 IO File "/home/nixos/.talon/user/cursorless-talon/src/marks/vscode_settings.py", line 33, in vscode_get_setting
path: Path = actions.user.vscode_settings_path()
2022-02-02 20:55:58 IO File "talon/scripting/actions.py", line 78, in __call__
2022-02-02 20:55:58 IO File "talon/scripting/types.py", line 383, in call
2022-02-02 20:55:58 IO File "/home/nixos/.talon/user/cursorless-talon/src/marks/vscode_settings.py", line 89, in vscode_settings_path
return pick_path(
2022-02-02 20:55:58 IO File "/home/nixos/.talon/user/cursorless-talon/src/marks/vscode_settings.py", line 68, in pick_path
return max(existing_paths, key=lambda path: path.stat().st_mtime)
2022-02-02 20:55:58 IO ValueError: max() arg is an empty sequence
2022-02-02 20:55:58 ERROR cb error topic="ready" cb=<function on_ready at 0x7fae65c94ca0>
15: lib/python3.9/threading.py:930* # loader thread
14: lib/python3.9/threading.py:973*
13: lib/python3.9/threading.py:910*
12: app/resources/loader.py:805|
11: app/resources/loader.py:755|
10: talon/scripting/dispatch.py:105|
9: talon/scripting/dispatch.py:144|
8: talon/scripting/dispatch.py:135|
7: ------------------------------------------------------# loader thread
6: talon/scripting/rctx.py:233| # 'ready' user.cursorless-talon.src.marks.mark:on_ready()
5: user/cursorless-talon/src/marks/mark.py:223| vscode_settings_path: Path = actions.u..
4: talon/scripting/actions.py:78 |
3: talon/scripting/types.py:383|
2: user/cursorless-talon/src/marks/vscode_settings.py:89 | return pick_path(
1: user/cursorless-talon/src/marks/vscode_settings.py:68 | return max(existing_paths, key=lambda path: path.stat().st_mtime)
ValueError: max() arg is an empty sequence
Metadata
Metadata
Assignees
Labels
talonRelated to cursorless-talon
Activity
ParetoOptimalDev commentedon Feb 3, 2022
I just installed vscode and didn't have a
~/.config/Code/User/settings.jsonfile. This seemed to fix things:At least no errors on talon startup, will report back after trying more stuff.
pokey commentedon Feb 3, 2022
Yes sorry that's a known issue that should be fixed soon. Just to check: was everything still working even though you had this error in your logs?
ParetoOptimalDev commentedon Feb 3, 2022
I got another error after that one, but I think maybe users installing extensions the expected vscode way might not run into the error below where I don't have
command-server.For context to understand how I run into it I'm installing vscode with nixos where I list out the extensions and only had
talon,parse-tree, andcursorless.ParetoOptimalDev commentedon Feb 3, 2022
My latest issue is:
That appears to be in knausj_talon under the
javascripttag, so I'll add that to settings.talon.ParetoOptimalDev commentedon Feb 3, 2022
I'm still getting:
Even though I've enabled that tag and restarted talon:
ParetoOptimalDev commentedon Feb 3, 2022
Things seem to work now despite that warning, but I'm just slow at understanding how to use things :)
ParetoOptimalDev commentedon Feb 4, 2022
Should I close this or leave it open until the fix you referred to is merged?
pokey commentedon Feb 4, 2022
I'm a bit surprised you have the
talonextension but notcommand-server. Thetalonextension bundles thecommand-serverextensionpokey commentedon Feb 4, 2022
Yes, as you discovered, that warning isn't actually a problem. It's actually a knausj thing, so you might file that there
You should remove that
user.javascripttag. Talon will automatically detect when you're in a javascript file and activate theuser.javascripttag for youpokey commentedon Feb 4, 2022
Yeah I think we can close this one; Cursorless already does its best to handle this case using the current infrastructure, and it won't be a problem with the next version, which should be shipping soon
adabru commentedon Apr 19, 2022
I am still getting this warning. In my Linux distribution (Arch) the settings paths are
~/.config/Code - OSS/User/settings.jsonfor the stable and~/.config/Code - Insiders/User/settings.jsonfor the beta version. I guess this is not covered yet: https://github.com/cursorless-dev/cursorless/blob/main/cursorless-talon/src/marks/vscode_settings.py#L87-L94 . Despite the warning everything is working fine.ajyoon commentedon Apr 28, 2022
I'm also getting this warning on arch Linux, similarly as far as I can tell everything is working
3 remaining items
saidelike commentedon May 10, 2023
Just to say that i had this error with latest talon beta and latest cursorless on a Ubuntu 22.04 and it was indeed due to the missing vscode setting file:
The fix:
pokey commentedon May 10, 2023
I would be a bit careful with that fix, though, because the message can appear for one of two reasons:
@auscompgeek @AndreasArvidsson does that sound right?
auscompgeek commentedon May 10, 2023
Sounds right. In any case, opening the VSCode user settings JSON using the VSCode command and saving it would be the guaranteed correct way to create the settings file.
pokey commentedon May 11, 2023
Yeah good call. Can just say "show settings json" with VSCode focused and then save it. Not sure if it automatically inserts a
{}, but can just say "inside braces" and then save if notnathanheffley commentedon Aug 17, 2023
In case anyone else is using VS Code Insiders on a Mac, you will get this error as well, as
src/apps/vscode_settings.pydoes not check for the Insiders settings which are atCode - Insiders/User/settings.jsoninstead ofCode/User/settings.jsonNot sure if anything should be done about it officially, as Insiders is beta for a reason, but good to know that it's an easy manual fix.
pokey commentedon Aug 18, 2023
Oh yeah that's a bug we should file and fix separately. should be super easy
juliatuttle commentedon Jul 21, 2024
Hi! I just helped a friend who's getting into coding set up Cursorless and fae ran into this same bug -- Talon wouldn't start up because cursorless-talon couldn't find
settings.json.Changing a setting in VS Code created the file and fixed the problem, but I had to dig into cursorless-talon's source code a little to figure out what it was looking for, and guess that changing a setting would fix it.
It would be nice if you could add a quick note to the installation page making sure that users have changed a setting -- even just flipping the color scheme back and forth -- so other folks don't get caught on this.
pokey commentedon Jul 21, 2024
@AndreasArvidsson I wonder if we could actually ensure the file is there automatically. Eg on Cursorless start-up the first time, just set and unset some dummy cursorless setting to make sure the file appears?
AndreasArvidsson commentedon Jul 21, 2024
Or we could just gracefully handle that it doesn't exist?
pokey commentedon Jul 21, 2024
The thing is we don't actually know that it doesn't exist, because there are several places it could be, including places we don't know about, as has happened before
That's not to say we shouldn't also gracefully handle it not existing, but ensuring it exists should help too
AndreasArvidsson commentedon Jul 22, 2024
Sure. We can just toggle the Cursorless debug setting or something.
pokey commentedon Jul 22, 2024
I guess we should check that toggling leaves an empty (or just
{}) file there. I would guess it does tho[-]max() arg is an empty sequence[/-][+]Failure on startup when user has no vscode `settings.json`[/+]AndreasArvidsson commentedon Jan 25, 2025
This is now handled gracefully Talon side. An empty file or non existing file doesn't really matter anymore. Closing this.