1

Here is what I am seeing, the sign to the left of each output
How do I make that go away? Again I am using VSCode/Python and Jupyter Notebooks

The outputs or like log.info("some text") From what I have read so far it seems to be because rich is using markup that is like HTML and then Jupyter renders this as HTLM or something

import logging
import os
import sys
from rich.logging import RichHandler
def set_logging():
    FORMAT = "Func/Mod:%(funcName)s  %(message)s"
    logging.basicConfig(level=logging.INFO, format=FORMAT, datefmt="[%X]", handlers=[RichHandler(markup=True, show_path=False)])
    if sys.platform.lower() == "win32": 
        os.system('color')
    log = logging.getLogger(__name__)
    #log = logging.getLogger("mylog")
    log.setLevel(logging.INFO)
    return log
if __name__=="__main__":
    log=set_logging()
    log.info("This is a test")
    log.info("This is a test")
    log.info("This is a test")

enter image description here

MiniMe
  • 1,057
  • 4
  • 22
  • 47
  • Could you please provide some code to reproduce the problem? – MingJie-MSFT Dec 01 '22 at 02:10
  • I used the code you provided and conducted different tests in jupyter and vscode. It seems that this problem only exists in vscode. I put forward [this bug](https://github.com/microsoft/vscode-jupyter/issues/12254) in github and hope this can be fixed. – MingJie-MSFT Dec 01 '22 at 03:28
  • Thank you please if they fix the issue please post a reply here I do not have a github account, not a personal one – MiniMe Dec 01 '22 at 04:21
  • The update solved it. Can you tell me how to set up again this interference to notebooks output ? :) default `pip install rich[jupyter]` is not enough. – matt91t Mar 12 '23 at 00:23

1 Answers1

1

According to the answer on github.

Unfortunately, there is currently no way to remove <\> on vscode-jupyter.

Because it is a button that appears on each output. It lets you change the renderer type for that output.

You can use jupyter notebook if you like. This symbol <\> does not appear in my use of jupyter notebook.

enter image description here

MingJie-MSFT
  • 5,569
  • 1
  • 2
  • 13
  • just because the things are they way they are that does not mean that they are good or right :-)) thanks for following up – MiniMe Dec 02 '22 at 05:13