Skip to content

utf8 codec can't decode byte... when running Greentea #7963

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

Closed
janjongboom opened this issue Sep 3, 2018 · 4 comments
Closed

utf8 codec can't decode byte... when running Greentea #7963

janjongboom opened this issue Sep 3, 2018 · 4 comments

Comments

@janjongboom
Copy link
Contributor

Description

I'm not sure if this is an issue with my target, or something else. But when running greentea I encounter the following:

mbedgt: test on hardware with target id: 46000000098be2c500000000000000000000000097969902
mbedgt: test suite 'mbed-os-features-frameworks-utest-tests-unit_tests-minimal_async_scheduler' ...... OK in 25.56 sec
        test case: 'Minimal Scheduler: Async Case 4 (Failure)' ....................................... OK in 0.24 sec
        test case: 'Minimal Scheduler: Case 1' ....................................................... OK in 0.02 sec
        test case: 'Minimal Scheduler: Case 2' ....................................................... OK in 0.01 sec
        test case: 'Minimal Scheduler: Case 3' ....................................................... OK in 0.02 sec
mbedgt: test case summary: 4 passes, 0 failures
mbedgt: mbed-host-test-runner: started
Exception in thread Thread-1:
Traceback (most recent call last):
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 810, in __bootstrap_inner
    self.run()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 763, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/Library/Python/2.7/site-packages/mbed_greentea-1.4.0-py2.7.egg/mbed_greentea/mbed_greentea_cli.py", line 508, in run_test_thread
    verbose=verbose)
  File "/Library/Python/2.7/site-packages/mbed_greentea-1.4.0-py2.7.egg/mbed_greentea/mbed_test_api.py", line 325, in run_host_test
    returncode, htrun_output = run_htrun(cmd, verbose)
  File "/Library/Python/2.7/site-packages/mbed_greentea-1.4.0-py2.7.egg/mbed_greentea/mbed_test_api.py", line 134, in run_htrun
    htrun_output += line.decode('utf-8')
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/encodings/utf_8.py", line 16, in decode
    return codecs.utf_8_decode(input, errors, True)
UnicodeDecodeError: 'utf8' codec can't decode byte 0xe1 in position 33: invalid continuation byte

Not sure if this is a specific test, specific target, or something else. This was when running against RTL8170AF target on GCC ARM 6 on MacOS.

Issue request type

[ ] Question
[ ] Enhancement
[X] Bug

@janjongboom
Copy link
Contributor Author

Quick fix (in mbed_test_api.py):

htrun_output += line.decode('utf-8', 'ignore')

@ciarmcom
Copy link
Member

ciarmcom commented Sep 3, 2018

ARM Internal Ref: MBOTRIAGE-1580

@aashishc1988
Copy link
Contributor

Wasn't this addressed in ARMmbed/greentea#278 ?

@cmonr
Copy link
Contributor

cmonr commented Sep 25, 2018

Closing since it's been resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants