Comments (5)
The additional Unicode characters that cause a UnicodeEncodeError with check_setup.py and Python 3.6 are on lines 50-55 of check_setup.py:
status = {
True: success("✔ yes"),
False: failure("✘ no"),
None: warning("⚑ warning"),
...: unknown("? unknown"),
}
from cli.
@terrycojones I believe this occurs when your terminal isn't using a Unicode locale, such as en_US.UTF-8
for example. Can you paste the output of running the locale
command?
Some CLI frameworks like Click do a lot of contortions to automagically deal with terminal encoding issues, but this project doesn't use Click (yet…?) and currently assumes a Unicode locale.
from cli.
@tsibley Ah, yes, you're right, thanks. Setting LC_ALL
to C.UTF-8
fixed it for me. I already had LANG=en_US.UTF-8
but that wasn't enough.
I guess for this issue, if anyone has the time/interest, printing a test (e.g., zero-width space) unicode char and catching UnicodeEncodeError
would allow you to decide what to output. But maybe that's overkill. The exception could also be caught and you could print out a line telling the user what to do, depending on what shell they are using :-) Or, just close this issue......
from cli.
@terrycojones Glad it's fixed for you!
Testing for UnicodeEncodeError is a clever way of detecting support! I'd think you could also inspect the encoding of stdout
, but that might lie. :-) In any case, I expect the best way to solve this is to adopt the Unicode terminal support and fallback handling from a robust library like Click instead of implementing it ourselves.
I'll leave this issue open as a reminder that this does exist as a legitimate issue and for anyone who might come across the same error and need a fix.
from cli.
Thanks for the pointer to Click, I'd not heard of it. Re leaving the issue open - up to you, of course. I would close it :-)
from cli.
Related Issues (20)
- Unhandled exception when renewing login from a different Cognito user pool HOT 1
- Pass AWS credentials from standard file to Docker HOT 1
- Show progress during `check-setup` HOT 1
- Unable to set up Singularity runtime on Fred Hutch's `rhino` HOT 2
- shell: Command hangs when `--conda` is used and the runtime has not been set up HOT 13
- Update pinned version of micromamba (1.1.0 -> 1.5.8) as it's been 9 months since last bump
- Update "build directory" terminology in help and docs HOT 1
- Scheduled CI failed across macOS due to IQTree error: `Invalid "-ntmax" option` HOT 2
- aws-batch: support Snakemake `--report` HOT 7
- Scheduled CI hanging on `macos-11` job
- CI failing: unable to pull `hello-world:latest` HOT 1
- Why did the tarball filename change from nextstrain-cli-VERSION.tar.gz to nextstrain_cli-VERSION.tar.gz from 8.2.0 to 8.3.0 HOT 1
- `nextstrain remote download` produces bad local filenames when periods are in the dataset name HOT 2
- CI on macOS failing due to IQTREE HOT 11
- Error during `nextstrain build` after `nextstrain update conda`
- Pyoxidizer currently unmaintained HOT 2
- CI: deprecation warning for node 16 use in setup-miniconda v2 HOT 2
- Fix broken links in docs
- aws-batch logs delayed HOT 1
- Communicate why an upload action was not allowed HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cli.