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

\r characters replaced by \r\n #722

Open
jonathanmisuel opened this issue Apr 27, 2023 · 1 comment
Open

\r characters replaced by \r\n #722

jonathanmisuel opened this issue Apr 27, 2023 · 1 comment

Comments

@jonathanmisuel
Copy link

🐛 Bug

Consider the following cell:
image
When running normally (i.e., through interactive python), each time a new line is printed, the \r put the cursor back to the start of the line which is replaced by the next print, and the final output of the cell should be only the last print: Hello World! 20

However if I use papermill to run the notebook with
I get the following output:
image

This is also affecting tdqm progress bar which output becomes an unreadable mess:
image

Is someone else encountering the issue ? I'm using it inside a Docker installation.

@Borda
Copy link
Member

Borda commented Nov 21, 2023

I think it is OS-dependent, could you share more details for reproducibility?

"\n" is the class Unix/linux style for new line. "\r\n" is the default Windows style for line separator. "\r" is classic Mac style for line separator.

see: https://stackoverflow.com/questions/28228383/difference-between-n-and-r-n-in-python

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

No branches or pull requests

2 participants