Python Interactive: Exception won't print message inside angle brackets
See original GitHub issueRaising an exception in the Python Interactive Window with a message that contains angle brackets <>
will remove the text within the angle brackets (and the brackets themselves) from the message, provided the text begins with an alphabetic character. This doesn’t happen with print statements or if the text inside the brackets begins with a non-alphabetic character. If no closing bracket exists in the message, the rest of the message will be removed.
Environment data
- VS Code version: 1.37.1
- Extension version (available under the Extensions sidebar): 2019.8.30787
- OS and version: Windows 10 Enterprise 1809
- Python version (& distribution if applicable, e.g. Anaconda): 3.7.4
- Type of virtual environment used (N/A | venv | virtualenv | conda | …): conda
- Relevant/affected Python packages and their versions: N/A
- Jedi or Language Server? (i.e. what is
"python.jediEnabled"
set to; more info microsoft/vscode-python#3977): Jedi
Expected behaviour
The entire message should be printed when an Exception is raised.
Actual behaviour
The text within the angle brackets is removed.
Steps to reproduce:
- Open a Python Interactive window and run the command
raise Exception("abc<def>ghi")
Logs
Output for Python
in the Output
panel (View
→Output
, change the drop-down the upper-right of the Output
panel to Python
)
N/A
Output from Console
under the Developer Tools
panel (toggle Developer Tools on under Help
; turn on source maps to make any tracebacks be useful by running Enable source map support for extension debugging
)
N/A
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (4 by maintainers)
Top GitHub Comments
😃
@oliverhiggs. Thanks for the report and the detailed repro. I can confirm what you are seeing, and that it does display correctly in Jupyter. We’ll look into it.