You are here

Error occured during test/run.py

3 posts / 0 new
Last post
Error occured during test/run.py
#1

Hello.

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

Traceback (most recent call last):
  File "test/run.py", line 651, in <module>
    if __name__ == "__main__": main(sys.argv)
  File "test/run.py", line 645, in main
    T.runUnitTests()
  File "test/run.py", 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/__init__.py", line 189, in dump
    for chunk in iterable:
  File "/usr/lib/python2.7/json/encoder.py", line 434, in _iterencode
    for chunk in _iterencode_dict(o, _current_indent_level):
  File "/usr/lib/python2.7/json/encoder.py", line 408, in _iterencode_dict
    for chunk in chunks:
  File "/usr/lib/python2.7/json/encoder.py", line 408, in _iterencode_dict
    for chunk in chunks:
  File "/usr/lib/python2.7/json/encoder.py", 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,

Dmitry.

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

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/run.py" 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
smlewis

Thank you!

Thu, 2015-12-17 06:56
DmitriiN