Article View: linux.debian.bugs.dist
Article #2782Bug#1152672: yt: FTBFS: unyt.exceptions.UnitConversionError: Cannot convert between 'code_length' (dim '(length)') and 'dimensio...
From: Sebastian Ramacher
Date: Sat, 31 Oct 2026 08:10
Date: Sat, 31 Oct 2026 08:10
111 lines
6135 bytes
6135 bytes
Source: yt
Version: 4.4.2-1
Severity: serious
Tags: ftbfs
Justification: fails to build from source (but built successfully in the past)
X-Debbugs-Cc: sramacher@debian.org
Dear maintainer,
yt FTBFS:
=================================== FAILURES ===================================
________________________ test_ghost_zone_extrapolation _________________________
def test_ghost_zone_extrapolation():
ds = fake_random_ds(16)
g = ds.index.grids[0]
vec = g.get_vertex_centered_data(
[("index", "x"), ("index", "y"), ("index", "z")], no_ghost=True
)
for i, ax in enumerate("xyz"):
xc = g["index", ax]
tf = lin.TrilinearFieldInterpolator(
xc,
(
g.LeftEdge[0] + g.dds[0] / 2.0,
g.RightEdge[0] - g.dds[0] / 2.0,
g.LeftEdge[1] + g.dds[1] / 2.0,
g.RightEdge[1] - g.dds[1] / 2.0,
g.LeftEdge[2] + g.dds[2] / 2.0,
g.RightEdge[2] - g.dds[2] / 2.0,
),
["x", "y", "z"],
truncate=True,
)
lx, ly, lz = np.mgrid[
g.LeftEdge[0] : g.RightEdge[0] : (g.ActiveDimensions[0] + 1) * 1j,
g.LeftEdge[1] : g.RightEdge[1] : (g.ActiveDimensions[1] + 1) * 1j,
g.LeftEdge[2] : g.RightEdge[2] : (g.ActiveDimensions[2] + 1) * 1j,
]
> xi = tf({"x": lx, "y": ly, "z": lz})
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
yt/utilities/tests/test_interpolators.py:136:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
yt/utilities/linear_interpolators.py:209: in __call__
x_i = np.digitize(x_vals, self.x_bins).astype("int64") - 1
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/usr/lib/python3/dist-packages/unyt/array.py:2133: in __array_function__
return _HANDLED_FUNCTIONS[func](*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/usr/lib/python3/dist-packages/unyt/_array_functions.py:398: in digitize
sanitized_bins = _sanitize_bins(x, bins)
^^^^^^^^^^^^^^^^^^^^^^^
/usr/lib/python3/dist-packages/unyt/_array_functions.py:174: in _sanitize_bins
return bins.to_value(getattr(arr, "units", dimensionless))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/usr/lib/python3/dist-packages/unyt/array.py:1047: in to_value
v = self.in_units(units, equivalence=equivalence, **kwargs).value
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/usr/lib/python3/dist-packages/unyt/array.py:928: in in_units
(conversion_factor, offset) = self.units.get_conversion_factor(
/usr/lib/python3/dist-packages/unyt/unit_object.py:686: in get_conversion_factor
return _get_conversion_factor(self, other_units, dtype)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
old_units = code_length, new_units = dimensionless, dtype = dtype('float64')
def _get_conversion_factor(old_units, new_units, dtype):
"""
Get the conversion factor between two units of equivalent dimensions. This
is the number you multiply data by to convert from values in `old_units` to
values in `new_units`.
Parameters
----------
old_units: str or Unit object
The current units.
new_units : str or Unit object
The units we want.
dtype: NumPy dtype
The dtype of the conversion factor
Returns
-------
conversion_factor : float
`old_units / new_units`
offset : float or None
Offset between the old unit and new unit.
"""
if old_units.dimensions != new_units.dimensions:
> raise UnitConversionError(
old_units, old_units.dimensions, new_units, new_units.dimensions
)
E unyt.exceptions.UnitConversionError: Cannot convert between 'code_length' (dim '(length)') and 'dimensionless' (dim '1').
/usr/lib/python3/dist-packages/unyt/unit_object.py:931: UnitConversionError
See
https://buildd.debian.org/status/fetch.php?pkg=yt&arch=amd64&ver=4.4.2-1%2Bb3&stamp=1793402058&raw=0
for details.
Cheers
--
Sebastian Ramacher
Technical Details
Message-ID:
<NUck1-8YdK-1@gated-at.bofh.it>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!news.corradoroberto.it!bofh.it!news.nic.it!robomodShow Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!news.corradoroberto.it!bofh.it!news.nic.it!robomod From: Sebastian Ramacher <sramacher@debian.org> Newsgroups: linux.debian.bugs.dist Subject: Bug#1152672: yt: FTBFS: unyt.exceptions.UnitConversionError: Cannot convert between 'code_length' (dim '(length)') and 'dimensionless' (dim '1') Date: Sat, 31 Oct 2026 09:10:01 +0100 Message-ID: <NUck1-8YdK-1@gated-at.bofh.it> X-Mailbox-Line: From debian-bugs-dist-request@lists.debian.org Sat Oct 31 08:03:10 2026 Old-Return-Path: <debbugs@buxtehude.debian.org> X-Spam-Flag: NO X-Spam-Score: -1.7 Reply-To: Sebastian Ramacher <sramacher@debian.org>, 1152672@bugs.debian.org Resent-To: debian-bugs-dist@lists.debian.org Resent-Cc: sramacher@debian.org, debian-astro-maintainers@lists.alioth.debian.org X-Debian-Pr-Message: report 1152672 X-Debian-Pr-Package: src:yt X-Debian-Pr-Keywords: ftbfs X-Debian-Pr-Source: yt MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Reportbug-Version: 13.2.0 X-Debian-User: sramacher X-Debian-Message: from BTS X-Mailing-List: <debian-bugs-dist@lists.debian.org> archive/latest/1999881 List-ID: <debian-bugs-dist.lists.debian.org> List-URL: <https://lists.debian.org/debian-bugs-dist/> Approved: robomod@news.nic.it Lines: 111 Organization: linux.* mail to news gateway Sender: robomod@news.nic.it X-Original-Date: Sat, 31 Oct 2026 09:02:09 +0100 X-Original-Message-ID: <auWggSAcVOvbfmKU@ramacher.at>