Unexpected token and undefined variables problems and warnings
See original GitHub issueEnvironment data
- VS Code version: 1.53.0-insider(4a875e23d20b64504a818834f3fa4c40adb8d480)
- Jupyter Extension version (available under the Extensions sidebar): v2020.12.414227025
- Python Extension version (available under the Extensions sidebar): v2021.1.429416775-dev
- OS (Windows | Mac | Linux distro) and version: MacOS Catalina 10.15.5 (19F101)
- Python and/or Anaconda version: 3.9.1 64bit
- Type of virtual environment used: venv (poetry env use python3)
- Jupyter server running: Local
Expected behaviour
I expect list of problems and warnings reflect the actual code issues in notebook cells and when I click on particular problem it lands me to the correct place that should be changed.
Actual behaviour
I’m getting a lot of errors and warnings like this:
All of the notices don’t seem to be relevant. They lead to wrong cells and it’s quite hard to understand what triggers these errors and warnings:
In the same time, I can actually execute notebook without any errors.
Steps to reproduce:
- Notebook shown in the gif can be found here: https://github.com/roma-glushko/kaggle-wine-quality
- Open project in VC and wait until it indexed
- Try to run cells of the notebook
Logs
Output for Jupyter
in the Output
panel (View
→Output
, change the drop-down the upper-right of the Output
panel to Jupyter
)
> ~/Projects/kaggle/kaggle-wine-quality/.venv/bin/python ~/.vscode-insiders/extensions/ms-toolsai.jupyter-2020.12.414227025/pythonFiles/pyvsc-run-isolated.py -c "import ipykernel"
> ~/Projects/kaggle/kaggle-wine-quality/.venv/bin/python ~/.vscode-insiders/extensions/ms-toolsai.jupyter-2020.12.414227025/pythonFiles/pyvsc-run-isolated.py vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.kernel_launcher_daemon -v
Started kernel Python 3
> ~/Projects/kaggle/kaggle-wine-quality/.venv/bin/python ~/.vscode-insiders/extensions/ms-toolsai.jupyter-2020.12.414227025/pythonFiles/pyvsc-run-isolated.py vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.kernel_launcher_daemon -v
Error 2020-12-22 12:20:16: Jupyter Kernel Spec not found for a local connection
> ~/Projects/kaggle/kaggle-wine-quality/.venv/bin/python ~/.vscode-insiders/extensions/ms-toolsai.jupyter-2020.12.414227025/pythonFiles/pyvsc-run-isolated.py vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.kernel_launcher_daemon -v
Started kernel Python 3.9.1 64-bit ('.venv')
> ~/Projects/kaggle/kaggle-wine-quality/.venv/bin/python ~/.vscode-insiders/extensions/ms-toolsai.jupyter-2020.12.414227025/pythonFiles/pyvsc-run-isolated.py vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.kernel_launcher_daemon -v
> ~/Projects/kaggle/kaggle-wine-quality/.venv/bin/python ~/.vscode-insiders/extensions/ms-toolsai.jupyter-2020.12.414227025/pythonFiles/pyvsc-run-isolated.py vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.kernel_launcher_daemon -v
> ~/Projects/kaggle/kaggle-wine-quality/.venv/bin/python ~/.vscode-insiders/extensions/ms-toolsai.jupyter-2020.12.414227025/pythonFiles/pyvsc-run-isolated.py vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.kernel_launcher_daemon -v
> ~/Projects/kaggle/kaggle-wine-quality/.venv/bin/python ~/.vscode-insiders/extensions/ms-toolsai.jupyter-2020.12.414227025/pythonFiles/pyvsc-run-isolated.py vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.kernel_launcher_daemon -v
> ~/Projects/kaggle/kaggle-wine-quality/.venv/bin/python ~/.vscode-insiders/extensions/ms-toolsai.jupyter-2020.12.414227025/pythonFiles/pyvsc-run-isolated.py vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.kernel_launcher_daemon -v
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
SyntaxError: Unexpected token - JavaScript - MDN Web Docs
The JavaScript exceptions "unexpected token" occur when a specific language construct was expected, but something else was provided.
Read more >Uncaught SyntaxError: Unexpected token : - Stack Overflow
"Uncaught SyntaxError: Unexpected token" error appearance when your data return wrong json format, in some case, you don't know you got wrong json...
Read more >Have a JavaScript Unexpected Token Error? Check Your Syntax
The JavaScript's parser expects tokens and symbols in a particular order, with relevant values or variables in between. Often, an Unexpected ...
Read more >Problem on 4/9: SyntaxError: Unexpected token . | Codecademy
“SyntaxError: Unexpected token .” It says I put a wrong period on line 2, but it's just part of Math.random() so I don't...
Read more >JavaScript Error Handling: Unexpected Token - GeeksforGeeks
Not follow them throws an error.An unexpected token occurs if JavaScript code has a missing or extra character { like, ) + –...
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
@roma-glushko Glad that it helped!
Hey @IanMatthewHuff thank you for replay 🙏
It actually helped to remove
%%time
directive from the cell:All errors are gone and only warnings are left. Interestingly if I return
%%time
back, then I could not reproduce these errors again 😌 The same goes for exported python file. It doesn’t have any error even when I add%%time
back in place.