You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When we select the following line in py file and "Run Selection/Line in Python REPL" , the Python REPL shows the loading icon forever and doesn't return.
print("こんにちは世界")
We see the following error in the developer tool.
[Extension Host] Log: Traceback (most recent call last):
File "/home/tomoki/.vscode/extensions/ms-python.python-2024.20.0-linux-x64/python_files/python_server.py", line 183, in <module>
request_json = json.loads(request_text)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/json/__init__.py", line 346, in loads
return _default_decoder.decode(s)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/json/decoder.py", line 341, in decode
raise JSONDecodeError("Extra data", s, end)
json.decoder.JSONDecodeError: Extra data: line 1 column 111 (char 110)
There is a mismatch between "Content-Length" and its content, and it tries to read the next header and causes the failure.
Steps to reproduce:
Create a.py
Write print("こんにちは世界")
Right-click and select "Run Python" -> "Run Selection/Line in Python REPL"
Actual result: We see the loading icon in Python REPL, and it doesn't return.
Expected result: We see the execution result "こんにちは世界".
Note that the other non-ascii characters can cause the issues. (For example, print("Olá Mundo!"))
Diagnostic data
Output for Python in the Output panel (View→Output, change the drop-down the upper-right of the Output panel to Python)
2024-11-22 21:42:42.619 [info] Experiment 'pythonRecommendTensorboardExt' is active
2024-11-22 21:42:42.619 [info] Experiment 'pythonTerminalEnvVarActivation' is active
2024-11-22 21:42:42.619 [info] Experiment 'pythonTestAdapter' is active
2024-11-22 21:42:42.619 [info] Native locator: Refresh started
2024-11-22 21:42:42.619 [info] Native locator: Refresh started
2024-11-22 21:42:42.630 [info] > pyenv which python
2024-11-22 21:42:42.630 [info] cwd: .
2024-11-22 21:42:42.913 [info] Native locator: Refresh finished in 340 ms
2024-11-22 21:42:42.916 [info] Python interpreter path: /bin/python3
2024-11-22 21:42:42.917 [info] Editor support is inactive since language server is set to None.
2024-11-22 21:42:50.866 [info] > /bin/python3 ~/.vscode/extensions/ms-python.python-2024.20.0-linux-x64/python_files/normalizeSelection.py
Extension version: 2024.20.0
VS Code version: Code 1.95.3 (f1a4fb101478ce6ec82fe9627c43efbf9e98c813, 2024-11-13T14:50:04.152Z)
OS version: Linux x64 6.11.7-amd64
Modes:
Python version (& distribution if applicable, e.g. Anaconda): 3.12.7
Type of virtual environment used (e.g. conda, venv, virtualenv, etc.): System
Extension version: 2024.20.0
VS Code version: Code 1.95.3 (Universal) (f1a4fb101478ce6ec82fe9627c43efbf9e98c813, 2024-11-13T14:50:04.152Z)
OS version: Darwin arm64 24.1.0
Modes:
- Python version (& distribution if applicable, e.g. Anaconda): 3.13.0
- Type of virtual environment used (e.g. conda, venv, virtualenv, etc.): Global
- Value of the `python.languageServer` setting: None
Type: Bug
Behaviour
When we select the following line in py file and "Run Selection/Line in Python REPL" , the Python REPL shows the loading icon forever and doesn't return.
We see the following error in the developer tool.
There is a mismatch between "Content-Length" and its content, and it tries to read the next header and causes the failure.
Steps to reproduce:
a.py
print("こんにちは世界")
Actual result: We see the loading icon in Python REPL, and it doesn't return.
Expected result: We see the execution result "こんにちは世界".
Note that the other non-ascii characters can cause the issues. (For example,
print("Olá Mundo!")
)Diagnostic data
Output for
Python
in theOutput
panel (View
→Output
, change the drop-down the upper-right of theOutput
panel toPython
)Extension version: 2024.20.0
VS Code version: Code 1.95.3 (f1a4fb101478ce6ec82fe9627c43efbf9e98c813, 2024-11-13T14:50:04.152Z)
OS version: Linux x64 6.11.7-amd64
Modes:
python.languageServer
setting: NoneUser Settings
Installed Extensions
System Info
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: disabled_software
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off
webnn: disabled_off
A/B Experiments
The text was updated successfully, but these errors were encountered: