UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 33: ordinal not in range(128)

Bug #1071385 reported by Martin Pitt
24
This bug affects 3 people
Affects Status Importance Assigned to Milestone
UTAH
Fix Released
Medium
Javier Collado

Bug Description

When I start the utah client on the demo tests that we created during the tests, it crashes with

$ sudo utah -r master.run
---
commands:
- cmd_type: testsuite_fetch
  command: bzr branch /home/martin/ubuntu/tmp/utah_howto utah_howto
  returncode: 0
  start_time: '2012-10-25 17:59:34.966693'
  stderr: |
    Branched 7 revisions.
  stdout: ''
  time_delta: '0:00:00.289332'
  user: root
- cmd_type: testsuite_fetch
  command: bzr revno
  returncode: 0
  start_time: '2012-10-25 17:59:35.256391'
  stderr: ''
  stdout: |
    7
  time_delta: '0:00:00.107578'
  user: root
- cmd_type: testsuite_setup
  command: touch /tmp/foo
  returncode: 0
  start_time: '2012-10-25 17:59:35.403232'
  stderr: ''
  stdout: ''
  testsuite: /var/lib/utah/testsuites/utah_howto
  time_delta: '0:00:00.003152'
  user: root
- cmd_type: testcase_test
  command: /bin/true
  extra_info:
    action: |
      1. Run /bin/true
    dependencies: coreutils
    description: basic sys sanity check
    expected_results: |
      1. /bin/true exists with zero
  returncode: 0
  start_time: '2012-10-25 17:59:35.450644'
  stderr: ''
  stdout: ''
  testcase: test_one
  testsuite: /var/lib/utah/testsuites/utah_howto
  time_delta: '0:00:00.015090'
  user: utah
- cmd_type: testcase_test
  command: wget fail://example.com
  extra_info:
    action: |
      1. use wget to retrieve fail://example.com
    dependencies: wget
    description: test wget for fail:// protocol
    expected_results: |
      1. wget retrieves example.com
  returncode: 1
  start_time: '2012-10-25 17:59:35.533382'
/usr/lib/python2.7/dist-packages/yaml/resolver.py:142: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal
  if value == u'':
  stderr:Traceback (most recent call last):
  File "/usr/bin/utah", line 140, in <module>
    main()
  File "/usr/bin/utah", line 131, in main
    returncode = runner.run()
  File "/usr/lib/python2.7/dist-packages/utah/client/runner.py", line 273, in run
    return self.process_results()
  File "/usr/lib/python2.7/dist-packages/utah/client/runner.py", line 244, in process_results
    self.result.result()
  File "/usr/lib/python2.7/dist-packages/utah/client/result.py", line 222, in result
    default_flow_style=False)
  File "/usr/lib/python2.7/dist-packages/yaml/__init__.py", line 202, in dump
    return dump_all([data], stream, Dumper=Dumper, **kwds)
  File "/usr/lib/python2.7/dist-packages/yaml/__init__.py", line 190, in dump_all
    dumper.represent(data)
  File "/usr/lib/python2.7/dist-packages/yaml/representer.py", line 29, in represent
    self.serialize(node)
  File "/usr/lib/python2.7/dist-packages/yaml/serializer.py", line 54, in serialize
    self.serialize_node(node, None, None)
  File "/usr/lib/python2.7/dist-packages/yaml/serializer.py", line 108, in serialize_node
    self.serialize_node(value, node, key)
  File "/usr/lib/python2.7/dist-packages/yaml/serializer.py", line 98, in serialize_node
    self.serialize_node(item, node, index)
  File "/usr/lib/python2.7/dist-packages/yaml/serializer.py", line 108, in serialize_node
    self.serialize_node(value, node, key)
  File "/usr/lib/python2.7/dist-packages/yaml/serializer.py", line 90, in serialize_node
    style=node.style))
  File "/usr/lib/python2.7/dist-packages/yaml/emitter.py", line 115, in emit
    self.state()
  File "/usr/lib/python2.7/dist-packages/yaml/emitter.py", line 413, in expect_block_mapping_simple_value
    self.expect_node(mapping=True)
  File "/usr/lib/python2.7/dist-packages/yaml/emitter.py", line 243, in expect_node
    self.process_tag()
  File "/usr/lib/python2.7/dist-packages/yaml/emitter.py", line 474, in process_tag
    self.style = self.choose_scalar_style()
  File "/usr/lib/python2.7/dist-packages/yaml/emitter.py", line 497, in choose_scalar_style
    self.analysis = self.analyze_scalar(self.event.value)
  File "/usr/lib/python2.7/dist-packages/yaml/emitter.py", line 653, in analyze_scalar
    if scalar.startswith(u'---') or scalar.startswith(u'...'):
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 33: ordinal not in range(128)

This doesn't happen with LANG=C, so I figure it wants to show some translated text. I'm running under a German locale (de_DE.UTF-8), on Quantal.

I don't think it's specific to the actual tests, it happened from revision 1 on, but I'm attaching the complete test dir including .bzr for reference.

Related branches

Revision history for this message
Martin Pitt (pitti) wrote :
Changed in utah:
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
Javier Collado (javier.collado) wrote :

Reproduced the problem using German locale. The problem is with the characters around fail in the following line:
fail://example.com: Nicht unterstütztes Schema »fail«.

I'll investigate how to make yaml happy about them.

Changed in utah:
assignee: nobody → Javier Collado (javier.collado)
status: Triaged → In Progress
Changed in utah:
status: In Progress → Fix Committed
Changed in utah:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.