Project

General

Profile

Actions

Bug #4334

closed

python3 UnicodeDecodeError in verify_value_string_arrays_are_terminated.py

Added by laforge over 4 years ago. Updated over 4 years ago.

Status:
Resolved
Priority:
Low
Assignee:
Target version:
-
Start date:
12/17/2019
Due date:
% Done:

100%

Spec Reference:

Description

From https://jenkins.osmocom.org/jenkins/job/gerrit-osmo-remsim/173/a1=default,a2=default,a3=default,a4=default,label=osmocom-gerrit-debian9/console

ERROR: file contains unterminated value_string 'struct value_string change_flags[]': './deps/simtrace2/host/src/simtrace2-sniff.c'
ERROR: file contains unterminated value_string 'struct value_string data_flags[]': './deps/simtrace2/host/src/simtrace2-sniff.c'
Traceback (most recent call last):
  File "/build_bin/verify_value_string_arrays_are_terminated.py", line 47, in <module>
    check_file(f)
  File "/build_bin/verify_value_string_arrays_are_terminated.py", line 30, in check_file
    arrays = value_string_array_re.findall(codecs.open(f, "r", "utf-8").read())
  File "/usr/lib/python3.5/codecs.py", line 698, in read
    return self.reader.read(size)
  File "/usr/lib/python3.5/codecs.py", line 501, in read
    newchars, decodedbytes = self.decode(data, self.errors)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb5 in position 336: invalid start byte
Build step 'Execute shell' marked build as failure
[WARNINGS]Skipping publisher since build result is FAILURE
Finished: FAILURE

Sure, there is an actual problem in the value_string arrays, but we should't get that UnicodeDecodeError.

Actions #1

Updated by laforge over 4 years ago

  • Subject changed from python3 problem in verify_value_string_arrays_are_terminated.py to python3 UnicodeDecodeError in verify_value_string_arrays_are_terminated.py

Slightly related: https://gerrit.osmocom.org/c/simtrace2/+/16635 fixes the actual value_string[] formatting (the termination was there). Nevertheless, this bug is about the UnicodeDecodeError

Actions #2

Updated by laforge over 4 years ago

now also in https://jenkins.osmocom.org/jenkins/job/gerrit-osmo-remsim/178/a1=default,a2=default,a3=default,a4=default,label=osmocom-gerrit-debian9/console

Traceback (most recent call last):
  File "/build_bin/verify_value_string_arrays_are_terminated.py", line 47, in <module>
    check_file(f)
  File "/build_bin/verify_value_string_arrays_are_terminated.py", line 30, in check_file
    arrays = value_string_array_re.findall(codecs.open(f, "r", "utf-8").read())
  File "/usr/lib/python3.5/codecs.py", line 698, in read
    return self.reader.read(size)
  File "/usr/lib/python3.5/codecs.py", line 501, in read
    newchars, decodedbytes = self.decode(data, self.errors)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb5 in position 11275: invalid start byte

Actions #3

Updated by laforge over 4 years ago

  • Status changed from New to In Progress
  • Assignee changed from osmith to laforge
  • % Done changed from 0 to 70

It's becoming too much of a blocker for making progess in merging osmo-remsim changes - https://gerrit.osmocom.org/c/osmo-ci/+/16638

Actions #4

Updated by laforge over 4 years ago

  • Status changed from In Progress to Resolved
  • % Done changed from 70 to 100

patch merged

Actions

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 48.8 MB)