Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Fix encoding issue #3
Conversation
sergiusens
reviewed
Apr 28, 2016
| @@ -75,7 +76,8 @@ def load_device_metadata(release): | ||
| 'RELEAS_VERSION': '16.04' }, | ||
| }""" | ||
| devices_metadata = {} | ||
| - with open(os.path.join(ROOT_DIR, DEVICES_MAPPING)) as f: | ||
| + with codecs.open(os.path.join(ROOT_DIR, DEVICES_MAPPING), | ||
| + encoding='utf-8') as f: |
sergiusens
commented
Apr 28, 2016
|
Looks good, just have a question |
didrocks
merged commit c6ca568
into
ubuntu-core:master
May 24, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
dholbach commentedApr 28, 2016
Traceback:
File "./generate", line 31, in
main()
File "/tmp/tmpoWBMbu/snappy-dev-website/sitegenerator/init.py",
line 68, in main
devices = load_device_metadata(release)
File "/tmp/tmpoWBMbu/snappy-dev-website/sitegenerator/releases.py",
line 79, in load_device_metadata
devices_metadata = yaml.load(f.read())
File "/usr/lib/python3.4/encodings/ascii.py", line 26, in decode
return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position
2299: ordinal not in range(128)