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

Unexpected output characters #176

Closed
freegor opened this issue Jan 9, 2022 · 2 comments
Closed

Unexpected output characters #176

freegor opened this issue Jan 9, 2022 · 2 comments

Comments

@freegor
Copy link

freegor commented Jan 9, 2022

We are using the yaspin in our library. It runs on any notebook, like jupyter or Databricks, on MacOS or Cloud based.
Generally yaspin works but some strange output even if I use your examples from the README file:
Screen_Shot_2022-01-09_at_13_16_25

so is it artifacts which I can remove?
Actually I have a problem with some number and 'h' when I use yaspin in my package.

@gailuron1964
Copy link

gailuron1964 commented Apr 22, 2022

Noticed the same thing. Funnily I only reproduce this with Jupyter Notebook. Not with Google Colab. @freegor, did you find a workaround ?

@pavdmyt
Copy link
Owner

pavdmyt commented May 11, 2022

Fixed in #193
Will be included into the next yaspin release.

pavdmyt pushed a commit that referenced this issue Jun 3, 2022
Second try of #193 and fixing #176

- Checking if stdout is a TTY to determine if output is a Jupyter cell or a terminal
- Disabled ANSI control sequence DECTCEM for Jupyter (anyway there is no cursor)
- Replaced ANSI control sequence EL for Jupyter (where it doesn't erase the line, but just prints three white spaces) with some code that simply overrides the entire line with white spaces
- Added patching sys.stdout.isatty to pretend output is a terminal
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants