Closed elicutler closed 4 years ago
After totally removing my virtual environment and then re-installing it via poetry, this issue has gone away. I still don't know what exactly happened, but I will close this out.
I'm having this same issue using Poetry on Windows 10. It was working until I updated one of the libraries in my environment.
I also tried rolling back the Python extension as well as reinstalling ipykernel and restarting my machine. As @elicutler noted, after totally removing my virtual environment and then re-installing it via poetry, this issue has gone away.
Environment details:
$ code --version
1.50.1
d2e414d9e4239a252d1ab117bd7067f125afd80a
x64
# python extension version: 2020.9.114305
$ python -V
Python 3.7.8
$ poetry --version
Poetry version 1.1.3
$ poetry show
adal 1.2.4 Note: This library is already replaced by MSAL Python, available here: https://pypi.org/project/msal/ .ADAL Python remains available here as a legacy. The ADAL for Python libr...
addict 2.3.0 Addict is a dictionary whose items can be set using both attribute and item syntax.
aiofiles 0.5.0 File support for asyncio.
async-generator 1.10 Async generators and context managers for Python 3.5+
attrs 20.2.0 Classes Without Boilerplate
backcall 0.2.0 Specifications for callback functions passed in to an API
bcrypt 3.2.0 Modern password hashing for your software and your servers
bleach 3.2.1 An easy safelist-based HTML-sanitizing tool.
boto3 1.16.1 The AWS SDK for Python
botocore 1.19.1 Low-level, data-driven core of boto 3.
cachetools 4.1.1 Extensible memoizing collections and decorators
certifi 2020.6.20 Python package for providing Mozilla's CA Bundle.
cffi 1.14.3 Foreign Function Interface for Python calling C code.
chardet 3.0.4 Universal encoding detector for Python 2 and 3
click 7.1.2 Composable command line interface toolkit
colorama 0.4.4 Cross-platform colored terminal text.
cryptography 3.1.1 cryptography is a package which provides cryptographic recipes and primitives to Python developers.
decorator 4.4.2 Decorators for Humans
defusedxml 0.6.0 XML bomb protection for Python stdlib modules
demjson 2.2.4 encoder, decoder, and lint/validator for JSON (JavaScript Object Notation) compliant with RFC 7159
entrypoints 0.3 Discover and load entry points from installed packages.
fastjsonschema 2.14.5 Fastest Python implementation of JSON schema
ftfy 5.5.1 Fixes some problems with Unicode text after the fact
fuzzywuzzy 0.18.0 Fuzzy string matching in python
google-api-core 1.23.0 Google API client core library
google-auth 1.22.1 Google Authentication Library
google-cloud-core 1.4.3 Google Cloud API client core library
google-cloud-translate 3.0.1 Google Cloud Translation API client library
googleapis-common-protos 1.52.0 Common protobufs used in Google APIs
grpcio 1.32.0 HTTP/2-based RPC framework
h11 0.11.0 A pure-Python, bring-your-own-I/O implementation of HTTP/1.1
httpcore 0.12.0 A minimal low-level HTTP client.
httpx 0.16.1 The next generation HTTP client.
humanize 0.5.1 python humanize utilities
idna 2.10 Internationalized Domain Names in Applications (IDNA)
importlib-metadata 2.0.0 Read metadata from Python packages
ipaddress 1.0.23 IPv4/IPv6 manipulation library
ipdata 3.2 Python Client for the ipdata IP Geolocation API
ipykernel 5.3.4 IPython Kernel for Jupyter
ipython 7.18.1 IPython: Productive Interactive Computing
ipython-genutils 0.2.0 Vestigial utilities from IPython
itsdangerous 1.1.0 Various helpers to pass data to untrusted environments and back.
jedi 0.17.2 An autocompletion tool for Python that can be used for text editors.
jinja2 2.11.2 A very fast and expressive template engine.
jmespath 0.10.0 JSON Matching Expressions
jsonschema 3.2.0 An implementation of JSON Schema validation for Python
jupyter-client 6.1.7 Jupyter protocol implementation and client libraries
jupyter-core 4.6.3 Jupyter core package. A base package on which Jupyter projects rely.
jupyterlab-pygments 0.1.2 Pygments theme using JupyterLab CSS variables
libcst 0.3.13 A concrete syntax tree with AST-like properties for Python 3.5, 3.6, 3.7 and 3.8 programs.
lxml 4.6.1 Powerful and Pythonic XML processing library combining libxml2/libxslt with the ElementTree API.
markupsafe 1.1.1 Safely add untrusted strings to HTML/XML markup.
mistune 0.8.4 The fastest markdown parser in pure Python
mypy-extensions 0.4.3 Experimental type system extensions for programs checked with the mypy typechecker.
nbclient 0.5.1 A client library for executing notebooks. Formerly nbconvert's ExecutePreprocessor.
nbconvert 6.0.7 Converting Jupyter Notebooks
nbformat 5.0.8 The Jupyter Notebook format
nest-asyncio 1.4.1 Patch asyncio to allow nested event loops
nostril 1.2.0 fbc0c91 Nonsense String Evaluator
numpy 1.14.5 NumPy: array processing for numbers, strings, records, and objects.
packaging 20.4 Core utilities for Python packages
pandas 0.25.3 Powerful data structures for data analysis, time series, and statistics
pandocfilters 1.4.2 Utilities for writing pandoc filters in python
paramiko 2.7.2 SSH2 protocol library
parso 0.7.1 A Python Parser
pathtools 0.1.2 File system general utilities
pickleshare 0.7.5 Tiny 'shelve'-like database with concurrency support
pillow 8.0.0 Python Imaging Library (Fork)
plac 0.9.1 The smartest command line arguments parser in the world
prettytable 1.0.1 A simple Python library for easily displaying tabular data in a visually appealing ASCII table format
prompt-toolkit 3.0.8 Library for building powerful interactive command lines in Python
proto-plus 1.11.0 Beautiful, Pythonic protocol buffers.
protobuf 3.13.0 Protocol Buffers
psycopg2 2.8.6 psycopg2 - Python-PostgreSQL Database Adapter
py 1.9.0 library with cross-python path, ini-parsing, io, code, log facilities
pyasn1 0.4.8 ASN.1 types and codecs
pyasn1-modules 0.2.8 A collection of ASN.1-based protocols modules.
pycparser 2.20 C parser in Python
pygments 2.7.1 Pygments is a syntax highlighting package written in Python.
pyjwt 1.7.1 JSON Web Token implementation in Python
pymysql 0.10.1 Pure Python MySQL Driver
pynacl 1.4.0 Python binding to the Networking and Cryptography (NaCl) library
pyparsing 2.4.7 Python parsing module
pyreadstat 1.0.2 Reads and Writes SAS, SPSS and Stata files into/from pandas data frames.
pyrsistent 0.17.3 Persistent/Functional/Immutable data structures
pytest 3.0.5 pytest: simple powerful testing with Python
python-dateutil 2.8.1 Extensions to the standard Python datetime module
python-dotenv 0.14.0 Add .env support to your django/flask apps in development and deployments
python-pptx 0.6.18 Generate and manipulate Open XML PowerPoint (.pptx) files
pytz 2020.1 World timezone definitions, modern and historical
pywin32 228 Python for Window Extensions
pyyaml 5.3.1 YAML parser and emitter for Python
pyzmq 19.0.2 Python bindings for 0MQ
quantipy3 0.2.2
requests 2.24.0 Python HTTP for Humans.
rfc3986 1.4.0 Validating URI References per RFC 3986
riverutils 1.0.2 riverutils/riverutils-1.0.2-py3-none-any.whl River Utilities
rsa 4.6 Pure-Python RSA implementation
s3transfer 0.3.3 An Amazon S3 Transfer Manager
savreaderwriter 3.4.2 Read and write SPSS files
scipy 1.2.1 SciPy: Scientific Library for Python
six 1.15.0 Python 2 and 3 compatibility utilities
sniffio 1.2.0 Sniff out which async library your code is running under
sqlalchemy 1.3.20 Database Abstraction Library
sshtunnel 0.1.5 Pure python SSH tunnels
starlette 0.13.8 The little ASGI library that shines.
tabulate 0.7.7 Pretty-print tabular data
testpath 0.4.4 Test utilities for code working with files and commands
tornado 6.0.4 Tornado is a Python web framework and asynchronous networking library, originally developed at FriendFeed.
traitlets 5.0.5 Traitlets Python configuration system
typing-extensions 3.7.4.3 Backported and Experimental Type Hints for Python 3.5+
typing-inspect 0.6.0 Runtime inspection utilities for typing module.
urllib3 1.25.11 HTTP library with thread-safe connection pooling, file post, and more.
uvicorn 0.12.2 The lightning-fast ASGI server.
watchdog 0.10.3 Filesystem events monitoring
watchgod 0.6 Simple, modern file watching and code reload in python.
wcwidth 0.2.5 Measures the displayed width of unicode strings in a terminal
webencodings 0.5.1 Character encoding aliases for legacy web content
websockets 8.1 An implementation of the WebSocket Protocol (RFC 6455 & 7692)
xlsxwriter 1.3.7 A Python module for creating Excel XLSX files.
xmltodict 0.12.0 Makes working with XML feel like you are working with JSON
zipp 3.3.1 Backport of pathlib-compatible object wrapper for zip files
Debug Console:
Error 2020-10-23 17:29:09: Jupyter Kernel Spec not found for a local connection
> ~\AppData\Local\pypoetry\Cache\virtualenvs\analysis-hub-_PmRVjjH-py3.7\Scripts\python.exe c:\Users\mhoendorf\.vscode\extensions\ms-python.python-2020.9.114305\pythonFiles\pyvsc-run-isolated.py -c "import notebook"
> ~\AppData\Local\pypoetry\Cache\virtualenvs\analysis-hub-_PmRVjjH-py3.7\Scripts\python.exe c:\Users\mhoendorf\.vscode\extensions\ms-python.python-2020.9.114305\pythonFiles\pyvsc-run-isolated.py -c "import ipykernel"
> ~\AppData\Local\pypoetry\Cache\virtualenvs\analysis-hub-_PmRVjjH-py3.7\Scripts\python.exe c:\Users\mhoendorf\.vscode\extensions\ms-python.python-2020.9.114305\pythonFiles\pyvsc-run-isolated.py -c "import jupyter"
> ~\AppData\Local\pypoetry\Cache\virtualenvs\analysis-hub-_PmRVjjH-py3.7\Scripts\python.exe c:\Users\mhoendorf\.vscode\extensions\ms-python.python-2020.9.114305\pythonFiles\pyvsc-run-isolated.py vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.kernel_launcher_daemon -v
> ~\Anaconda3\Scripts\conda.exe info --json
> ~\Anaconda3\Scripts\conda.exe env list
> ~\AppData\Local\pypoetry\Cache\virtualenvs\analysis-hub-_PmRVjjH-py3.7\Scripts\python.exe c:\Users\mhoendorf\.vscode\extensions\ms-python.python-2020.9.114305\pythonFiles\pyvsc-run-isolated.py vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.kernel_launcher_daemon -v
Error 2020-10-23 17:29:13: Kernel died r [Error]: Traceback (most recent call last):
at t._next (c:\Users\mhoendorf\.vscode\extensions\ms-python.python-2020.9.114305\out\client\extension.js:54:664931)
at t.__tryOrUnsub (c:\Users\mhoendorf\.vscode\extensions\ms-python.python-2020.9.114305\out\client\extension.js:24:5463)
at t.next (c:\Users\mhoendorf\.vscode\extensions\ms-python.python-2020.9.114305\out\client\extension.js:24:4632)
at t._next (c:\Users\mhoendorf\.vscode\extensions\ms-python.python-2020.9.114305\out\client\extension.js:24:3736)
at t.next (c:\Users\mhoendorf\.vscode\extensions\ms-python.python-2020.9.114305\out\client\extension.js:24:3407)
at t.next (c:\Users\mhoendorf\.vscode\extensions\ms-python.python-2020.9.114305\out\client\extension.js:24:8976)
at c:\Users\mhoendorf\.vscode\extensions\ms-python.python-2020.9.114305\out\client\extension.js:9:60009
at c:\Users\mhoendorf\.vscode\extensions\ms-python.python-2020.9.114305\out\client\extension.js:47:362324
at c:\Users\mhoendorf\.vscode\extensions\ms-python.python-2020.9.114305\out\client\extension.js:47:362542
at Immediate._onImmediate (c:\Users\mhoendorf\.vscode\extensions\ms-python.python-2020.9.114305\out\client\extension.js:47:364107)
at processImmediate (internal/timers.js:439:21)
Error 2020-10-23 17:29:41: Timed out waiting to get a heartbeat from kernel process.
Error 2020-10-23 17:29:41: Failed to connect raw kernel session: Error: Timed out waiting to get a heartbeat from kernel process.
Error 2020-10-23 17:29:41: Failed to determine if a notebook is active for the current editor Error: Timed out waiting to get a heartbeat from kernel process.
at f.waitForHeartbeat (c:\Users\mhoendorf\.vscode\extensions\ms-python.python-2020.9.114305\out\client\extension.js:56:574362)
Error 2020-10-23 17:29:41: Failed to determine if a notebook is active for the current editor Error: Timed out waiting to get a heartbeat from kernel process.
at f.waitForHeartbeat (c:\Users\mhoendorf\.vscode\extensions\ms-python.python-2020.9.114305\out\client\extension.js:56:574362)
Error 2020-10-23 17:29:41: Failed to initialize S Error: Timed out waiting to get a heartbeat from kernel process.
at f.waitForHeartbeat (c:\Users\mhoendorf\.vscode\extensions\ms-python.python-2020.9.114305\out\client\extension.js:56:574362)
Error 2020-10-23 17:29:41: DataScience Error Error: Timed out waiting to get a heartbeat from kernel process.
at f.waitForHeartbeat (c:\Users\mhoendorf\.vscode\extensions\ms-python.python-2020.9.114305\out\client\extension.js:56:574362)
Error 2020-10-23 17:29:41: DataScience Error Error: Timed out waiting to get a heartbeat from kernel process.
at f.waitForHeartbeat (c:\Users\mhoendorf\.vscode\extensions\ms-python.python-2020.9.114305\out\client\extension.js:56:574362)
Error 2020-10-23 17:29:41: Failed to initialize ipywidgetHandler Error: Timed out waiting to get a heartbeat from kernel process.
at f.waitForHeartbeat (c:\Users\mhoendorf\.vscode\extensions\ms-python.python-2020.9.114305\out\client\extension.js:56:574362)
I am running VS Code on Windows 10. I use poetry for env+package management.
Before this issue started, in order to launch VS Code and have it find the jupyter kernel I would need to first launch the poetry shell and then open code from the root of my project repo:
Now when VS Code starts up, in the python logs I immediately get some new errors I don't remember seeing before:
And when I attempt to run code in an interactive window, I receive the "Timed out waiting to get a heartbeat from kernel process." error, with the following python log output:
I have tried rolling back to older versions of the python extension as well as VS Code, but to no avail. This all used to work fine last week.
I saw https://github.com/microsoft/vscode-python/issues/14118 posted with the same error, but that was due to a space in the username, which is not the case for me.
I also saw https://github.com/microsoft/vscode-python/issues/13365 posted with the same error, in which it was claimed that this issue should only affect users with Windows + Python 3.8 + ipykernel < 5.1.4, but I have a higher version of ipykernel and am still getting this issue.
Thanks in advance for your help and for making this fantastic IDE!