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

Fix UnicodeDecodeError by changing UTF-8 character to ASCII. #1002

Merged
merged 1 commit into from Nov 7, 2017

Conversation

sebastic
Copy link
Contributor

@sebastic sebastic commented Nov 6, 2017

Full error from the Debian package build:

======================================================================
ERROR: test_parser (pysal.examples.test_examples.Example_Tester)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/pysal-1.14.3/.pybuild/pythonX.Y_3.6/build/pysal/examples/test_examples.py", line 15, in test_parser
    self.extext = ex.explain(example)
  File "/build/pysal-1.14.3/.pybuild/pythonX.Y_3.6/build/pysal/examples/__init__.py", line 77, in explain
    return _read_example(fpath)
  File "/build/pysal-1.14.3/.pybuild/pythonX.Y_3.6/build/pysal/examples/__init__.py", line 55, in _read_example
    title = io.readline().strip('\n')
  File "/usr/lib/python3.6/encodings/ascii.py", line 26, in decode
    return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe3 in position 384: ordinal not in range(128)
-------------------- >> begin captured stdout << ---------------------

```
======================================================================
ERROR: test_parser (pysal.examples.test_examples.Example_Tester)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/pysal-1.14.3/.pybuild/pythonX.Y_3.6/build/pysal/examples/test_examples.py", line 15, in test_parser
    self.extext = ex.explain(example)
  File "/build/pysal-1.14.3/.pybuild/pythonX.Y_3.6/build/pysal/examples/__init__.py", line 77, in explain
    return _read_example(fpath)
  File "/build/pysal-1.14.3/.pybuild/pythonX.Y_3.6/build/pysal/examples/__init__.py", line 55, in _read_example
    title = io.readline().strip('\n')
  File "/usr/lib/python3.6/encodings/ascii.py", line 26, in decode
    return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe3 in position 384: ordinal not in range(128)
-------------------- >> begin captured stdout << ---------------------
```
@coveralls
Copy link

coveralls commented Nov 6, 2017

Coverage Status

Coverage remained the same at 83.652% when pulling b9bd8b4 on sebastic:test_examples into e7763d1 on pysal:master.

@ljwolf
Copy link
Member

ljwolf commented Nov 7, 2017

looks good to me.

@ljwolf ljwolf merged commit 8d1e596 into pysal:master Nov 7, 2017
@sebastic sebastic deleted the test_examples branch November 7, 2017 11:53
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.

None yet

3 participants