[BUG] no lexer for filename 'xxx' found
See original GitHub issueDescribe the bug At the top of the tracebacks for my tool on exceptions I’m getting the following (see this GitHub Actions workflow):
╭───────────────────── Traceback (most recent call last) ──────────────────────╮
│ /opt/hostedtoolcache/Python/3.7.9/x64/bin/nf-core:8 in <module> │
│ │
│ no lexer for filename 'nf-core' found │
Alternatively, if testing locally:
╭─────────────────────── Traceback (most recent call last) ───────────────────────╮
│ /Users/ewels/miniconda3/envs/py3/bin/nf-core:33 in <module> │
│ │
│ no lexer for filename 'nf-core' found │
Syntax highlighting in the traceback does work correctly locally.
To Reproduce
Any traceback from https://github.com/nf-core/tools has this warning. To test locally I added an assert False
statement here and ran nf-core list
.
Platform Linux (GitHub Actions), Mac OSX (locally).
Diagnose
python -m rich.diagnose
❯ python -m rich.diagnose
╭────────────────────────────────────────────────────────── <class 'rich.console.Console'> ───────────────────────────────────────────────────────────╮
│ A high level console interface. │
│ │
│ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │
│ │ <console width=151 ColorSystem.TRUECOLOR> │ │
│ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ color_system = 'truecolor' │
│ encoding = 'utf-8' │
│ file = <_io.TextIOWrapper name='<stdout>' mode='w' encoding='UTF-8'> │
│ is_dumb_terminal = False │
│ is_jupyter = False │
│ is_terminal = True │
│ legacy_windows = False │
│ no_color = False │
│ options = ConsoleOptions(legacy_windows=False, min_width=1, max_width=151, is_terminal=True, encoding='utf-8', justify=None, │
│ overflow=None, no_wrap=False, highlight=None) │
│ record = False │
│ safe_box = True │
│ size = ConsoleDimensions(width=151, height=43) │
│ soft_wrap = False │
│ stderr = False │
│ style = None │
│ tab_size = 8 │
│ width = 151 │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
python -m rich._windows
❯ python -m rich._windows
platform="Darwin"
WindowsConsoleFeatures(vt=False, truecolor=False)
pip freeze | grep rich
❯ pip freeze | grep rich
rich==9.10.0
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Compiling seperate lexer and parser in subdirectory fails #638
Fails with: error(3): cannot find tokens file 'build/Lexer.tokens' ... failes to find lexer.tokens as build/src/foo/ is not it's search path.
Read more >What is the wrong with the simple ANTLR grammar?
1 Answer 1 ... And no, the lexer will not backtrack to "give up" the character "[" from ": [" to match the...
Read more >CudaText plugins - Free Pascal wiki
Comment chars are editable in SynWrite editor, in dialog "Lexer properties" ... If file name (without path) matches any of these wildcards, ...
Read more >Scintilla Documentation
Scintilla 5 has moved the lexers from Scintilla into a new Lexilla ... GTK sample which can be used to find bugs or...
Read more >Project 3 — Lexer (Java) - St. Lawrence University
Danger! Do not submit any pre-compiled jar files with your submisison. This includes, but is not limited to, your lexer, JFlex, etc. The ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Should be fixed in 9.11.0
True, if the first line starts with hash bang and contains the text “python” assume a Python lexer, otherwise plain text. Seems like a reasonable approach.