Azure / Azure/azure_preview_modules

CI error: UnicodeEncodeError: 'ascii' codec can't encode character u'\\u2018' in position 596

Open
#359 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
43
Forks
57
PR merge metrics
No merged PRs in 30d

Description

This issue I've seen multiple times in both `master` branch CI tests and while working on #358.

Examples:

- https://travis-ci.org/Azure/azure_preview_modules/jobs/648225075#L716
- https://travis-ci.org/Azure/azure_preview_modules/jobs/648225084#L1026
- https://travis-ci.org/Azure/azure_preview_modules/jobs/648311452#L1268
- https://travis-ci.org/Azure/azure_preview_modules/jobs/648311454#L798

Excerpt:

"/home/travis/virtualenv/python2.7.15/lib/python2.7/site-packages/msrestazure/azure_exceptions.py", line 89, in __str__
error_str += "Message: {}".format(self._message)
UnicodeEncodeError: 'ascii' codec can't encode character u'\\u2018' in position 596: ordinal not in range(128)

When looking at this error in the `msrestazure` python module we see it originates inside the `CloudErrorData` class. So this leads to me assuming that the Azure API is returning a [unicode quote](https://www.fileformat.info/info/unicode/char/2018/index.htm) in it's error message.

The problem is that this error message is being encoded as 'ascii'. This is probably due to the environment the tests is being run in (when no special locale or language variables have been set then python will fall back to `ascii` encoded output).

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.