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

Swap utf-8 progbar character for ASCII #692

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

rw
Copy link
Contributor

@rw rw commented Jun 24, 2017

In terminal work, printing Unicode characters can be problematic. In particular, using a Unicode character for the progressbar causes encoding errors if the environment is not set up properly:

UnicodeEncodeError: 'ascii' codec can't encode character '\u2588' in position 15: ordinal not in range(128)

This patch changes the progress bar character to be ASCII, so that we have less to worry about when running Edward.

In terminal work. printing Unicode characters can be problematic. In particular, using a Unicode character for the progressbar causes encoding errors if the environment is not set up properly:

```
UnicodeEncodeError: 'ascii' codec can't encode character '\u2588' in position 15: ordinal not in range(128)
```

This uses a typical ASCII character for the progress bar so that we have less to worry about when running Edward.
@dustinvtran
Copy link
Member

IMO the UTF-8 black bar is a lot cleaner. Does catching this error with a try/except block work? E.g., it will default to using the ASCII * if that error is raised.

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

Successfully merging this pull request may close these issues.

2 participants