Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Notebooks: backspaces are rendered as printable rather than control characters in output cells #13069

Closed
bvenreply opened this issue Nov 8, 2023 · 5 comments · Fixed by #13137
Labels
notebook issues related to notebooks

Comments

@bvenreply
Copy link
Contributor

Bug Description:

Backspaces are rendered as printable rather than control characters in notebook output cells.

Here's an example, from the Keras curses-like model training progress reporting interface:

image

Steps to Reproduce:

  • Create a Jupyter notebook in Theia, and run this python code within a cell:
    import time
    
    msg = "abcdef"
    
    for i in range(5):
        print(msg, end="")
        time.sleep(1)
        for j in msg:
            print("\b", end="", flush=True)
        time.sleep(0.5)

Here's a comparison with the same code run in vscode, which displays the expected output:

image

Additional Information

  • Operating System: 5.10.192-183.736.amzn2.x86_64 GNU/Linux on the server 6.1.0-13-amd64 GNU/Linux on the client
  • Theia Version: 1.43.1
  • Browser: Chromium version 119.0.6045.105
  • Python jupyter kernel: tested with 3.8, 3.11 and 3.12

This is a less trivial issue than it may appear: taking the above example of Keras model training, note that many thousands of these lines are printed throughout the model training and the cell attempts to render them all, to the point that the browser is slowed down and the notebook becomes unusable.

@vince-fugnitto vince-fugnitto added the notebook issues related to notebooks label Nov 13, 2023
@JonasHelming
Copy link
Contributor

@msujew Marc, are you aware of this BR? Is this maybe something you want to adress as part of #13012 ?

@msujew
Copy link
Member

msujew commented Nov 27, 2023

@JonasHelming Seems to me like this should be treated as a separate thing to #13012.

@jonah-iden Can you take a look at this? I'm wondering whether vscode is doing preprocessing here, or whether the webview is doing something special that we don't support.

@jonah-iden
Copy link
Contributor

sure i can take a look sometime this week

@kkistm
Copy link

kkistm commented Dec 1, 2023

Just curious if there are any updates about the ticket.

@jonah-iden
Copy link
Contributor

I think i found the Solution and am currently testing it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
notebook issues related to notebooks
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants