question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

max() arg is an empty sequence

See original GitHub issue

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

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:13 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
adabrucommented, Apr 19, 2022

I am still getting this warning. In my Linux distribution (Arch) the settings paths are ~/.config/Code - OSS/User/settings.json for the stable and ~/.config/Code - Insiders/User/settings.json for 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.

1reaction
pokeycommented, Feb 4, 2022

I’m still getting:

2022-02-03 17:10:05 WARNING actions: skipped because they have no matching declaration: (user.code_type_dictionary)

Yes, as you discovered, that warning isn’t actually a problem. It’s actually a knausj thing, so you might file that there

Even though I’ve enabled that tag and restarted talon:

$ cat ~/.talon/user/settings.talon 
settings():
    speech.record_all = 1
tag(): user.i3wm
tag(): user.javascript

You should remove that user.javascript tag. Talon will automatically detect when you’re in a javascript file and activate the user.javascript tag for you

Read more comments on GitHub >

github_iconTop Results From Across the Web

Python ValueError: max() arg is an empty sequence Solution
The “ValueError: max() arg is an empty sequence” error is raised when you try to find the largest item in an empty list...
Read more >
ValueError: max() arg is an empty sequence - Stack Overflow
1. When len(v) == 0 , in clkFindMost , max(v) raises ValueError . – Dan D. Oct 1, 2014 at 22:33 · this...
Read more >
ValueError: max( ) arg is an empty sequence - STechies
In this article, we will learn about the error ValueError: max( ) arg is an empty sequence. In python, the max( ) method...
Read more >
ValueError: max() arg is an empty sequence in Python
The “ValueError: max() arg is an empty sequence” occurs when a user tries to pass an empty sequence as an argument of the...
Read more >
ValueError: max() arg is an empty sequence · Issue #300
ValueError : max() arg is an empty sequence #300. Open. Felix-python opened this issue on Jul 19, 2021 · 1 comment.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found