autopkgtest failure "UnicodeDecodeError: 'utf-8' codec can't decode byte 0x80 in position 14" in test_stl.py on s390x

Bug #1939057 reported by Bryce Harrington
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-meshio (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

https://autopkgtest.ubuntu.com/results/autopkgtest-impish/impish/s390x/p/python-meshio/20210731_000740_21465@/log.gz

Version 4.3.9-1 passes, but all tests for 4.3.11-1 and 4.4.6-1 fails on s390x with this error:

=================================== FAILURES ===================================
__________________________ test_stl[True-1e-08-mesh0] __________________________

mesh = <meshio mesh object>
  Number of points: 4
  Number of cells:
    triangle: 2
  Cell sets: grain0, grain1
binary = True, tol = 1e-08

    @pytest.mark.parametrize(
        "mesh",
        [
            # helpers.empty_mesh,
            helpers.tri_mesh
        ],
    )
    @pytest.mark.parametrize(
        "binary, tol",
        [
            (False, 1.0e-15),
            # binary STL only operates in single precision
            (True, 1.0e-8),
        ],
    )
    def test_stl(mesh, binary, tol):
        def writer(*args, **kwargs):
            return meshio.stl.write(*args, binary=binary, **kwargs)

> helpers.write_read(writer, meshio.stl.read, mesh, tol)

test/test_stl.py:26:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test/helpers.py:367: in write_read
    mesh = reader(p)
/usr/lib/python3/dist-packages/meshio/stl/_stl.py:40: in read
    out = _read_ascii(f)
/usr/lib/python3/dist-packages/meshio/stl/_stl.py:105: in _read_ascii
    data = iter_loadtxt(
/usr/lib/python3/dist-packages/meshio/stl/_stl.py:69: in iter_loadtxt
    data = np.fromiter(iter_func(), dtype=dtype)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

    def iter_func():
        items = None
        for _ in range(skiprows):
            try:
                next(infile)
            except StopIteration:
                raise ReadError("EOF Skipped too many rows")

        for line in infile:
> line = line.decode("utf-8").strip()
E UnicodeDecodeError: 'utf-8' codec can't decode byte 0x80 in position 14: invalid start byte

/usr/lib/python3/dist-packages/meshio/stl/_stl.py:56: UnicodeDecodeError
=============================== warnings summary ===============================

Maybe tol = 1e-08 is hitting some data type issue on s390x?

Bryce Harrington (bryce)
description: updated
description: updated
Revision history for this message
Graham Inggs (ginggs) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package python-meshio - 4.4.6-1ubuntu1

---------------
python-meshio (4.4.6-1ubuntu1) impish; urgency=medium

  * Read binary STL file in little-endian byte order (LP: #1939057)

 -- Graham Inggs <email address hidden> Sun, 26 Sep 2021 05:21:42 +0000

Changed in python-meshio (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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