-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Description
Description
When importing the python builtin module decimal
and setting the precision to 1 every second cell executed in jupyter lab freezes. The same code runs without problems in plain python.
Reproduce
Run the following code cells in Jupyter lab
The execution of the second cell fails, even though the code there is just a print statement.
On the console where jupyter lab was started is some output that might be helpful.
The same problem also occurs in Spyder. It seems related to the communication with the kernel that is running in the background.
Expected behavior
Even though the code itself might raise exceptions, jupyter lab should not freeze. The minimal example above might be a bit odd, but the more realistic case where the issue was encountered is not suitable for a minimal example.
Context
- Operating System and version: Windows
- Browser and version: Chrome
- JupyterLab version: 4.1.4
Troubleshoot Output
Not available, jupyter lab freezes
Command Line Output
[IPKernelApp] ERROR | Invalid Message Traceback (most recent call last): File "C:\develop\env312\Lib\site-packages\ipykernel\kernelbase.py", line 395, in dispatch_shell msg = self.session.deserialize(msg, content=True, copy=False) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\develop\env312\Lib\site-packages\jupyter_client\session.py", line 1082, in deserialize message["header"] = extract_dates(header) ^^^^^^^^^^^^^^^^^^^^^ File "C:\develop\env312\Lib\site-packages\jupyter_client\jsonutil.py", line 75, in extract_dates new_obj[k] = extract_dates(v) ^^^^^^^^^^^^^^^^ File "C:\develop\env312\Lib\site-packages\jupyter_client\jsonutil.py", line 80, in extract_dates obj = parse_date(obj) ^^^^^^^^^^^^^^^ File "C:\develop\env312\Lib\site-packages\jupyter_client\jsonutil.py", line 65, in parse_date dt = _dateutil_parse(s) ^^^^^^^^^^^^^^^^^^ File "C:\develop\env312\Lib\site-packages\dateutil\parser\_parser.py", line 1368, in parse return DEFAULTPARSER.parse(timestr, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\develop\env312\Lib\site-packages\dateutil\parser\_parser.py", line 640, in parse res, skipped_tokens = self._parse(timestr, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\develop\env312\Lib\site-packages\dateutil\parser\_parser.py", line 740, in _parse i = self._parse_numeric_token(l, i, info, ymd, res, fuzzy) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\develop\env312\Lib\site-packages\dateutil\parser\_parser.py", line 942, in _parse_numeric_token (res.minute, res.second) = self._parse_min_sec(value) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\develop\env312\Lib\site-packages\dateutil\parser\_parser.py", line 1106, in _parse_min_sec sec_remainder = value % 1 ~~~~~~^~~ decimal.InvalidOperation: []
Browser Output
-