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

Allow various UTF formats in the config file if on Python 3.6 or later. #499

Merged
merged 2 commits into from
May 23, 2020

Conversation

terrycojones
Copy link
Contributor

The various UTF formats can be handled by the json module if the input file is opened in binary mode. See the note See note at the bottom of https://docs.python.org/3/library/json.html#json.load

The diff here passes rb as a mode if on Python >= 3.6

I don't see anywhere to add tests for this. But... the change works for me and I see the non-ASCII chars correctly displayed by auspice.

Fixes #498.

@elebow
Copy link
Contributor

elebow commented Mar 30, 2020

As of two days ago, Python 3.6 is the minimum supported version (see #482), so the conditional can be omitted.

@terrycojones
Copy link
Contributor Author

As of two days ago, Python 3.6 is the minimum supported version (see #482), so the conditional can be omitted.

OK, updated.

@rneher rneher merged commit abb8bb7 into nextstrain:master May 23, 2020
@terrycojones terrycojones deleted the allow-utf8-in-config-json branch May 23, 2020 15:07
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.

[BUG] UTF-8 in the --augur-config file causes UnicodeDecodeError exception
3 participants