You are here

Error occured during test/

3 posts / 0 new
Last post
Error occured during test/


I tried to run Unit test (python test/, but it stopped with an error:

Traceback (most recent call last):
  File "test/", line 651, in <module>
    if __name__ == "__main__": main(sys.argv)
  File "test/", line 645, in main
  File "test/", line 416, in runUnitTests
    with file('.unit_test_results.json', 'w') as f: json.dump(all_json, f, sort_keys=True, indent=2)
  File "/usr/lib/python2.7/json/", line 189, in dump
    for chunk in iterable:
  File "/usr/lib/python2.7/json/", line 434, in _iterencode
    for chunk in _iterencode_dict(o, _current_indent_level):
  File "/usr/lib/python2.7/json/", line 408, in _iterencode_dict
    for chunk in chunks:
  File "/usr/lib/python2.7/json/", line 408, in _iterencode_dict
    for chunk in chunks:
  File "/usr/lib/python2.7/json/", line 390, in _iterencode_dict
    yield _encoder(value)
UnicodeDecodeError: 'utf8' codec can't decode byte 0xf0 in position 4159: invalid continuation byte

What should I do to fix it?

Best regards,


Post Situation: 
Tue, 2015-12-15 08:05

Broadly, you can ignore it - the unit tests are used by developers to verify changes they make to the code, and are occasionally helpful in debugging problems for users (or in assuring them Rosetta is installed correctly).  Here, the test script itself is failing, not the tests.

Specifically, it looks to me like a Python version problem - something is getting mismatched within your python libraries.  Try it as "test/" without python (it should have the shebang to work that way).  Try checking your python version looks compatible with the python2.7 libraries indicated in the error message - perhaps something is trying to run python 3 using python 2 libraries?

Tue, 2015-12-15 08:24

Thank you!

Thu, 2015-12-17 06:56