SyntaxError in snippets
See original GitHub issueI was about typing np.abs
Don’t know what caused the errror.
Traceback
File "/home/mariano/.local/lib/python3.6/site-packages/spyder/plugins/editor/extensions/snippets.py", line 758, in insert_snippet
ast = build_snippet_ast(text)
File "/home/mariano/.local/lib/python3.6/site-packages/spyder/utils/snippets/ast.py", line 155, in build_snippet_ast
peek_token
SyntaxError: Syntax Error: Expected any of the following characters: ['dollar', 'name', 'int', 'case', '\\:', '\\$', 'text_pipe', '{', '\\}', '\\', '\\/', '\\,', 'symbol', 'whitespace', 'left_curly_name', ':', ':+', ':-', ':?', ',', '}'], got <slash, />
Versions
- Spyder version: 4.0.0b5
- Python version: 3.6.8
- Qt version: 5.12.4
- PyQt5 version: 5.12.3
- Operating System: Linux 5.0.0-29-generic
Dependencies
cloudpickle >=0.5.0 : 1.2.1 (OK)
pygments >=2.0 : 2.4.2 (OK)
qtconsole >=4.5.5 : 4.5.5 (OK)
nbconvert >=4.0 : 5.6.0 (OK)
sphinx >=0.6.6 : 2.2.0 (OK)
pylint >=0.25 : 2.3.1 (OK)
psutil >=0.3 : 5.6.3 (OK)
qtawesome >=0.5.7 : 0.6.0 (OK)
qtpy >=1.5.0 : 1.9.0 (OK)
pickleshare >=0.4 : 0.7.5 (OK)
zmq >=17 : 18.1.0 (OK)
chardet >=2.0.0 : 3.0.4 (OK)
numpydoc >=0.6.0 : 0.9.1 (OK)
spyder_kernels >=1.5.0;<2.0.0: 1.5.0 (OK)
qdarkstyle >=2.7 : 2.7 (OK)
atomicwrites >=1.2.0 : 1.2.0 (OK)
diff_match_patch >=20181111 : 20181111 (OK)
watchdog : None (OK)
keyring : None (OK)
pexpect >=4.4.0 : 4.7.0 (OK)
pympler : None (OK)
sympy >=0.7.3 : None (NOK)
cython >=0.21 : None (NOK)
IPython >=4.0 : 7.8.0 (OK)
matplotlib >=2.0.0 : 3.0.3 (OK)
pandas >=0.13.1 : 0.24.1 (OK)
numpy >=1.7 : 1.17.1 (OK)
scipy >=0.17.0 : 1.3.1 (OK)
pyls >=0.28.2;<0.29.0 : 0.28.3 (OK)
xdg >=0.26 : 0.26 (OK)
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Snippet not activated due to syntax error - WordPress.org
Hi, I had been using Code Snippets plugin for codes. ... “Snippet not activated, the following error was encountered: syntax error, unexpected token...
Read more >google chrome - Snippets - Identifier has already been declared
And when I try to run it 2nd time, it says the variable has already been declared and throws an error at first...
Read more >SQL snippets output syntax error - Metabase Discussion
I'm trying to use my snippet. SELECT 'My Title' AS "Title", CONCAT(CAST(CAST(((select COUNT(*) from {{#2}} as "MyTable" WHERE {{snippet: ...
Read more >SyntaxError in systemverilog.snippets with UltiSnips · Issue #678
UltiSnips throws an error when editing a .sv file: SnippetSyntaxError: Invalid line 'casez (${1})' in [...]systemverilog.snippets:55 That's ...
Read more >JS Snippet gives "Uncaught SyntaxError: Unexpected token ,"
When visiting the page the snippet is there but it doesn't work and shows in the console a “Uncaught SyntaxError: Unexpected token ,”...
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
Don’t think so … thanks for asking !
Is this still an issue?