[Avocado-devel] a problem when I run test with avocado

Lucas Meneghel Rodrigues lookkas at gmail.com
Tue Nov 24 13:02:10 UTC 2015


You could try to apply the attached patch to

/usr/lib/python2.7/site-packages/avocado-0.30.0-py2.7.egg/avocado/core/plugins/htmlresult.py

Just to see if it solves the problem (of course this is a horrible
solution, but would help me get away with not having an actual environment
to reproduce the problem).

Once we verify the fix (or the absence of a fix), we can progress.

On Tue, Nov 24, 2015 at 10:35 AM Lucas Meneghel Rodrigues <lookkas at gmail.com>
wrote:

> On Tue, Nov 24, 2015 at 7:34 AM panpan.zhao <panpan.zhao at i-soft.com.cn>
> wrote:
>
>> Now I had a problem when I run test with avocado.The detail information
>> is as follows:
>>
>>  #avocado run sleeptest
>> JOB ID     : 13a596d8c3d4ea2eb5aabace094f7857386abffa
>>
>> JOB LOG    : /root/avocado/job-results/job-2015-11-24T16.31-13a596d/job.log
>> TESTS      : 1
>>  (1/1) sleeptest.py:SleepTest.test: PASS (1.01 s)
>>
>>
>> Avocado crashed: UnicodeDecodeError: 'utf8' codec can't decode byte 0x89 in position 65716: invalid start byte
>> Traceback (most recent call last):
>>
>>
>>   File "/usr/lib/python2.7/site-packages/avocado-0.30.0-py2.7.egg/avocado/core/job.py", line 497, in _run
>>     timeout=self.timeout)
>>
>>
>>   File "/usr/lib/python2.7/site-packages/avocado-0.30.0-py2.7.egg/avocado/core/runner.py", line 364, in run_suite
>>     self.result.end_tests()
>>
>>
>>   File "/usr/lib/python2.7/site-packages/avocado-0.30.0-py2.7.egg/avocado/core/result.py", line 66, in end_tests
>>     output_plugin.end_tests()
>>
>>
>>   File "/usr/lib/python2.7/site-packages/avocado-0.30.0-py2.7.egg/avocado/core/plugins/htmlresult.py", line 230, in end_tests
>>     self._render_report()
>>
>>
>>   File "/usr/lib/python2.7/site-packages/avocado-0.30.0-py2.7.egg/avocado/core/plugins/htmlresult.py", line 240, in _render_report
>>     report_contents = renderer.render(open(template, 'r').read(), context)
>>
>>
>>   File "/usr/lib/python2.7/site-packages/pystache/renderer.py", line 458, in render
>>     return self._render_string(template, *context, **kwargs)
>>
>>
>>   File "/usr/lib/python2.7/site-packages/pystache/renderer.py", line 406, in _render_string
>>     return self._render_final(render_func, *context, **kwargs)
>>
>>
>>   File "/usr/lib/python2.7/site-packages/pystache/renderer.py", line 423, in _render_final
>>     return render_func(engine, stack)
>>
>>
>>   File "/usr/lib/python2.7/site-packages/pystache/renderer.py", line 404, in <lambda>
>>     render_func = lambda engine, stack: engine.render(template, stack)
>>
>>
>>   File "/usr/lib/python2.7/site-packages/pystache/renderengine.py", line 181, in render
>>     return parsed_template.render(self, context_stack)
>>
>>
>>   File "/usr/lib/python2.7/site-packages/pystache/parsed.py", line 47, in render
>>     parts = map(get_unicode, self._parse_tree)
>>
>>
>>   File "/usr/lib/python2.7/site-packages/pystache/parsed.py", line 46, in get_unicode
>>     return node.render(engine, context)
>>
>>
>>   File "/usr/lib/python2.7/site-packages/pystache/parser.py", line 218, in render
>>     parts.append(self.parsed.render(engine, context))
>>
>>
>>   File "/usr/lib/python2.7/site-packages/pystache/parsed.py", line 47, in render
>>     parts = map(get_unicode, self._parse_tree)
>>
>>
>>   File "/usr/lib/python2.7/site-packages/pystache/parsed.py", line 46, in get_unicode
>>     return node.render(engine, context)
>>
>>
>>   File "/usr/lib/python2.7/site-packages/pystache/parser.py", line 122, in render
>>     return engine.escape(s)
>>
>>
>>   File "/usr/lib/python2.7/site-packages/pystache/renderer.py", line 202, in _escape_to_unicode
>>     return unicode(self.escape(self._to_unicode_soft(s)))
>>
>>
>>   File "/usr/lib/python2.7/site-packages/pystache/renderer.py", line 186, in _to_unicode_soft
>>     return self.unicode(s)
>>
>>
>>   File "/usr/lib/python2.7/site-packages/pystache/renderer.py", line 229, in unicode
>>     return unicode(b, encoding, self.decode_errors)
>>
>>
>> UnicodeDecodeError: 'utf8' codec can't decode byte 0x89 in position 65716: invalid start byte
>>
>> Please include the traceback info and command line used on your bug report
>> Report bugs visiting
>> https://github.com/avocado-framework/avocado/issues/new
>>
>> How do I fix it?
>>
>>
> This is likely to be a problem related to your locale when trying to
> render the HTML report [1]. As a temporary measure, you can remove the HTML
> report plugin from the system:
>
> dnf remove avocado-plugins-output-html
>
> Now I need to see how I can fix this problem.
>
> [1] Of course, this is my best guess.
>
>
>> ------------------------------
>> panpan.zhao
>>
>> i-Soft infrastructure software CO.,Ltd.
>> _______________________________________________
>> Avocado-devel mailing list
>> Avocado-devel at redhat.com
>> https://www.redhat.com/mailman/listinfo/avocado-devel
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/avocado-devel/attachments/20151124/37865a08/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-avocado.core.plugins.htmlresult-Use-unicode-errors-i.patch
Type: text/x-patch
Size: 2473 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/avocado-devel/attachments/20151124/37865a08/attachment.bin>


More information about the Avocado-devel mailing list