[Debian-astro-maintainers] Bug#1114394: specreduce: FTBFS: dh_auto_test: error: pybuild --test --test-pytest -i python{version} -p 3.13 returned exit code 13
Santiago Vila
sanvila at debian.org
Fri Sep 5 19:26:53 BST 2025
Package: src:specreduce
Version: 1.6.0-1
Severity: serious
Tags: ftbfs forky sid
Dear maintainer:
During a rebuild of all packages in unstable, your package failed to build.
Below you will find how the build ends (probably the most relevant part,
but not necessarily). If required, the full build log is available here:
https://people.debian.org/~sanvila/build-logs/202509/
About the archive rebuild: The build was made on virtual machines from AWS,
using sbuild and a reduced chroot with only build-essential packages.
If you could not reproduce the bug please contact me privately, as I
am willing to provide ssh access to a virtual machine where the bug is
fully reproducible.
If this is really a bug in one of the build-depends, please use
reassign and add an affects on src:specreduce, so that this is still
visible in the BTS web page for this package.
Thanks.
--------------------------------------------------------------------------------
[...]
debian/rules clean
dh clean --with python3 --buildsystem=pybuild
dh_auto_clean -O--buildsystem=pybuild
dh_autoreconf_clean -O--buildsystem=pybuild
dh_clean -O--buildsystem=pybuild
debian/rules binary
dh binary --with python3 --buildsystem=pybuild
dh_update_autotools_config -O--buildsystem=pybuild
dh_autoreconf -O--buildsystem=pybuild
dh_auto_configure -O--buildsystem=pybuild
dh_auto_build -O--buildsystem=pybuild
I: pybuild plugin_pyproject:129: Building wheel for python3.13 with "build" module
I: pybuild base:311: python3.13 -m build --skip-dependency-check --no-isolation --wheel --outdir /<<PKGBUILDDIR>>/.pybuild/cpython3_3.13
* Building wheel...
[... snipped ...]
[90m# Attempt to parse the spectral axis. If none is given, try instead to[39;49;00m[90m[39;49;00m
[90m# parse a given wcs. This is put into a GWCS object to[39;49;00m[90m[39;49;00m
[90m# then be used behind-the-scenes for all specutils operations.[39;49;00m[90m[39;49;00m
[94mif[39;49;00m spectral_axis [95mis[39;49;00m [95mnot[39;49;00m [94mNone[39;49;00m:[90m[39;49;00m
[90m# Ensure that the spectral axis is an astropy Quantity[39;49;00m[90m[39;49;00m
[94mif[39;49;00m [95mnot[39;49;00m [96misinstance[39;49;00m(spectral_axis, u.Quantity):[90m[39;49;00m
[94mraise[39;49;00m [96mValueError[39;49;00m([33m"[39;49;00m[33mSpectral axis must be a `Quantity` or [39;49;00m[33m"[39;49;00m[90m[39;49;00m
[33m"[39;49;00m[33m`SpectralAxis` object.[39;49;00m[33m"[39;49;00m)[90m[39;49;00m
[90m[39;49;00m
[90m# If spectral axis is provided as an astropy Quantity, convert it[39;49;00m[90m[39;49;00m
[90m# to a specutils SpectralAxis object.[39;49;00m[90m[39;49;00m
[94mif[39;49;00m [95mnot[39;49;00m [96misinstance[39;49;00m(spectral_axis, SpectralAxis):[90m[39;49;00m
[96mself[39;49;00m._spectral_axis = SpectralAxis([90m[39;49;00m
spectral_axis, redshift=redshift,[90m[39;49;00m
radial_velocity=radial_velocity, doppler_rest=rest_value,[90m[39;49;00m
doppler_convention=velocity_convention,[90m[39;49;00m
bin_specification=bin_specification)[90m[39;49;00m
[90m# If a SpectralAxis object is provided, we assume it doesn't need[39;49;00m[90m[39;49;00m
[90m# information from other keywords added[39;49;00m[90m[39;49;00m
[94melse[39;49;00m:[90m[39;49;00m
[94mfor[39;49;00m a [95min[39;49;00m [radial_velocity, redshift]:[90m[39;49;00m
[94mif[39;49;00m a [95mis[39;49;00m [95mnot[39;49;00m [94mNone[39;49;00m:[90m[39;49;00m
[94mraise[39;49;00m [96mValueError[39;49;00m([33m"[39;49;00m[33mCannot separately set redshift or [39;49;00m[33m"[39;49;00m[90m[39;49;00m
[33m"[39;49;00m[33mradial_velocity if a SpectralAxis [39;49;00m[33m"[39;49;00m[90m[39;49;00m
[33m"[39;49;00m[33mobject is input to spectral_axis[39;49;00m[33m"[39;49;00m)[90m[39;49;00m
[90m[39;49;00m
[96mself[39;49;00m._spectral_axis = spectral_axis[90m[39;49;00m
[90m[39;49;00m
[94mif[39;49;00m wcs [95mis[39;49;00m [94mNone[39;49;00m:[90m[39;49;00m
wcs = gwcs_from_array([96mself[39;49;00m._spectral_axis,[90m[39;49;00m
flux.shape,[90m[39;49;00m
spectral_axis_index=[96mself[39;49;00m.spectral_axis_index[90m[39;49;00m
)[90m[39;49;00m
[90m[39;49;00m
[94melif[39;49;00m wcs [95mis[39;49;00m [94mNone[39;49;00m:[90m[39;49;00m
[90m# If no spectral axis or wcs information is provided, initialize[39;49;00m[90m[39;49;00m
[90m# with an empty gwcs based on the flux.[39;49;00m[90m[39;49;00m
[94mif[39;49;00m [96mself[39;49;00m.spectral_axis_index [95mis[39;49;00m [94mNone[39;49;00m:[90m[39;49;00m
[94mif[39;49;00m flux.ndim == [94m1[39;49;00m:[90m[39;49;00m
[96mself[39;49;00m._spectral_axis_index = [94m0[39;49;00m[90m[39;49;00m
[94melse[39;49;00m:[90m[39;49;00m
> [94mraise[39;49;00m [96mValueError[39;49;00m([33m"[39;49;00m[33mMust specify spectral_axis_index if no WCS or spectral[39;49;00m[33m"[39;49;00m[90m[39;49;00m
[33m"[39;49;00m[33m axis is input.[39;49;00m[33m"[39;49;00m)[90m[39;49;00m
[1m[31mE ValueError: Must specify spectral_axis_index if no WCS or spectral axis is input.[0m
[1m[31m/usr/lib/python3/dist-packages/specutils/spectra/spectrum.py[0m:351: ValueError
[31m[1m____________ TestMeasureCrossDispersionProfile.test_errors_warnings ____________[0m
self = <specreduce.tests.test_utils.TestMeasureCrossDispersionProfile object at 0x7f8286e22050>
[0m[94mdef[39;49;00m [92mtest_errors_warnings[39;49;00m([96mself[39;49;00m):[90m[39;49;00m
img = mk_gaussian_img(nrows=[94m10[39;49;00m, ncols=[94m10[39;49;00m)[90m[39;49;00m
[94mwith[39;49;00m pytest.raises([96mValueError[39;49;00m,[90m[39;49;00m
match=[33m'[39;49;00m[33m`crossdisp_axis` must be 0 or 1[39;49;00m[33m'[39;49;00m):[90m[39;49;00m
measure_cross_dispersion_profile(img, crossdisp_axis=[94m2[39;49;00m)[90m[39;49;00m
[90m[39;49;00m
[94mwith[39;49;00m pytest.raises([96mValueError[39;49;00m, match=[33m'[39;49;00m[33m`trace` must be Trace object, [39;49;00m[33m'[39;49;00m[90m[39;49;00m
[33m'[39;49;00m[33mnumber to specify the location [39;49;00m[33m'[39;49;00m[90m[39;49;00m
[33m'[39;49;00m[33mof a FlatTrace, or None to use [39;49;00m[33m'[39;49;00m[90m[39;49;00m
[33m'[39;49;00m[33mcenter of image.[39;49;00m[33m'[39;49;00m):[90m[39;49;00m
> measure_cross_dispersion_profile(img, trace=[33m'[39;49;00m[33mnot a trace or a number[39;49;00m[33m'[39;49;00m)[90m[39;49;00m
[1m[31mspecreduce/tests/test_utils.py[0m:147:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[1m[31mspecreduce/utils/utils.py[0m:92: in measure_cross_dispersion_profile
[0mimage = parser._parse_image(image, disp_axis=disp_axis)[90m[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^[90m[39;49;00m
[1m[31mspecreduce/core.py[0m:95: in _parse_image
[0m[94mreturn[39;49;00m [96mself[39;49;00m._get_data_from_image(image, disp_axis=disp_axis, mask_treatment=mask_treatment)[90m[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^[90m[39;49;00m
[1m[31mspecreduce/core.py[0m:155: in _get_data_from_image
[0mimg = Spectrum([90m[39;49;00m
[1m[31m/usr/lib/python3/dist-packages/astropy/utils/decorators.py[0m:143: in deprecated_func
[0m[94mreturn[39;49;00m func(*args, **kwargs)[90m[39;49;00m
^^^^^^^^^^^^^^^^^^^^^[90m[39;49;00m
[1m[31m/usr/lib/python3/dist-packages/specutils/spectra/spectrum.py[0m:960: in __init__
[0m[96msuper[39;49;00m().[92m__init__[39;49;00m(*args, **kwargs)[90m[39;49;00m
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <[AttributeError("'Spectrum1D' object has no attribute '_data'") raised in repr()] Spectrum1D object at 0x7f8286c854f0>
flux = <Quantity [[0.04393693, 0.04393693, 0.04393693, 0.04393693, 0.04393693,
0.04393693, 0.04393693, 0.04393693...23323, 0.96923323, 0.96923323, 0.96923323,
0.96923323, 0.96923323, 0.96923323, 0.96923323, 0.96923323]] DN>
spectral_axis = <Quantity [0., 1., 2., 3., 4., 5., 6., 7., 8., 9.] pix>
spectral_axis_index = None, wcs = None, velocity_convention = None
rest_value = None, redshift = None, radial_velocity = None
bin_specification = None, move_spectral_axis = None
kwargs = {'mask': array([[False, False, False, False, False, False, False, False, False,
False],
[False, False, ..., 1., 1., 1., 1., 1., 1., 1., 1.],
[1., 1., 1., 1., 1., 1., 1., 1., 1., 1.]]), 'unit': Unit("DN")}
unknown_kwargs = set(), matching_axes = [0, 1], add_elements = [0, 1], i = 1
add_element = 1
[0m[94mdef[39;49;00m [92m__init__[39;49;00m([96mself[39;49;00m, flux=[94mNone[39;49;00m, spectral_axis=[94mNone[39;49;00m, spectral_axis_index=[94mNone[39;49;00m,[90m[39;49;00m
wcs=[94mNone[39;49;00m, velocity_convention=[94mNone[39;49;00m, rest_value=[94mNone[39;49;00m,[90m[39;49;00m
redshift=[94mNone[39;49;00m, radial_velocity=[94mNone[39;49;00m, bin_specification=[94mNone[39;49;00m,[90m[39;49;00m
move_spectral_axis=[94mNone[39;49;00m, **kwargs):[90m[39;49;00m
[90m[39;49;00m
[94mif[39;49;00m spectral_axis_index == -[94m1[39;49;00m:[90m[39;49;00m
spectral_axis_index = flux.ndim - [94m1[39;49;00m[90m[39;49;00m
[90m[39;49;00m
[90m# If the flux (data) argument is already a Spectrum (as it would[39;49;00m[90m[39;49;00m
[90m# be for internal arithmetic operations), avoid setup entirely.[39;49;00m[90m[39;49;00m
[94mif[39;49;00m [96misinstance[39;49;00m(flux, Spectrum):[90m[39;49;00m
[96mself[39;49;00m._spectral_axis_index = flux.spectral_axis_index[90m[39;49;00m
[96mself[39;49;00m._spectral_axis = flux.spectral_axis[90m[39;49;00m
[96msuper[39;49;00m().[92m__init__[39;49;00m(flux)[90m[39;49;00m
[94mreturn[39;49;00m[90m[39;49;00m
[90m[39;49;00m
[96mself[39;49;00m._spectral_axis_index = spectral_axis_index[90m[39;49;00m
[90m# Might as well handle this right away[39;49;00m[90m[39;49;00m
[94mif[39;49;00m spectral_axis_index [95mis[39;49;00m [94mNone[39;49;00m [95mand[39;49;00m flux [95mis[39;49;00m [95mnot[39;49;00m [94mNone[39;49;00m:[90m[39;49;00m
[94mif[39;49;00m flux.ndim == [94m1[39;49;00m:[90m[39;49;00m
[96mself[39;49;00m._spectral_axis_index = [94m0[39;49;00m[90m[39;49;00m
[94melif[39;49;00m flux [95mis[39;49;00m [94mNone[39;49;00m:[90m[39;49;00m
[96mself[39;49;00m._spectral_axis_index = [94m0[39;49;00m[90m[39;49;00m
[90m[39;49;00m
[90m# Check for pre-defined entries in the kwargs dictionary.[39;49;00m[90m[39;49;00m
unknown_kwargs = [96mset[39;49;00m(kwargs).difference([90m[39;49;00m
{[33m'[39;49;00m[33mdata[39;49;00m[33m'[39;49;00m, [33m'[39;49;00m[33munit[39;49;00m[33m'[39;49;00m, [33m'[39;49;00m[33muncertainty[39;49;00m[33m'[39;49;00m, [33m'[39;49;00m[33mmeta[39;49;00m[33m'[39;49;00m, [33m'[39;49;00m[33mmask[39;49;00m[33m'[39;49;00m, [33m'[39;49;00m[33mcopy[39;49;00m[33m'[39;49;00m,[90m[39;49;00m
[33m'[39;49;00m[33mextra_coords[39;49;00m[33m'[39;49;00m})[90m[39;49;00m
[90m[39;49;00m
[94mif[39;49;00m [96mlen[39;49;00m(unknown_kwargs) > [94m0[39;49;00m:[90m[39;49;00m
[94mraise[39;49;00m [96mValueError[39;49;00m([33m"[39;49;00m[33mInitializer contains unknown arguments(s): [39;49;00m[33m{}[39;49;00m[33m.[39;49;00m[33m"[39;49;00m[90m[39;49;00m
[33m"[39;49;00m[33m"[39;49;00m.format([33m'[39;49;00m[33m, [39;49;00m[33m'[39;49;00m.join([96mmap[39;49;00m([96mstr[39;49;00m, unknown_kwargs))))[90m[39;49;00m
[90m[39;49;00m
[90m# Handle initializing from NDCube objects[39;49;00m[90m[39;49;00m
[94melif[39;49;00m [96misinstance[39;49;00m(flux, NDCube):[90m[39;49;00m
[94mif[39;49;00m flux.unit [95mis[39;49;00m [94mNone[39;49;00m:[90m[39;49;00m
[94mraise[39;49;00m [96mValueError[39;49;00m([33m"[39;49;00m[33mInput NDCube missing unit parameter[39;49;00m[33m"[39;49;00m)[90m[39;49;00m
[90m[39;49;00m
[90m# Change the flux array from bare ndarray to a Quantity[39;49;00m[90m[39;49;00m
q_flux = flux.data << u.Unit(flux.unit)[90m[39;49;00m
[90m[39;49;00m
[96mself[39;49;00m.[92m__init__[39;49;00m(flux=q_flux, wcs=flux.wcs, mask=flux.mask,[90m[39;49;00m
uncertainty=flux.uncertainty)[90m[39;49;00m
[94mreturn[39;49;00m[90m[39;49;00m
[90m[39;49;00m
[90m# If the mask kwarg is not passed to the constructor, but the flux array[39;49;00m[90m[39;49;00m
[90m# contains NaNs, add the NaN locations to the mask.[39;49;00m[90m[39;49;00m
[94mif[39;49;00m [33m"[39;49;00m[33mmask[39;49;00m[33m"[39;49;00m [95mnot[39;49;00m [95min[39;49;00m kwargs [95mand[39;49;00m flux [95mis[39;49;00m [95mnot[39;49;00m [94mNone[39;49;00m:[90m[39;49;00m
nan_mask = np.isnan(flux)[90m[39;49;00m
[94mif[39;49;00m nan_mask.any():[90m[39;49;00m
[94mif[39;49;00m [96mhasattr[39;49;00m([96mself[39;49;00m, [33m"[39;49;00m[33mmask[39;49;00m[33m"[39;49;00m):[90m[39;49;00m
kwargs[[33m"[39;49;00m[33mmask[39;49;00m[33m"[39;49;00m] = np.logical_or(nan_mask, [96mself[39;49;00m.mask)[90m[39;49;00m
[94melse[39;49;00m:[90m[39;49;00m
kwargs[[33m"[39;49;00m[33mmask[39;49;00m[33m"[39;49;00m] = nan_mask.copy()[90m[39;49;00m
[94mdel[39;49;00m nan_mask[90m[39;49;00m
[90m[39;49;00m
[90m# Ensure that the flux argument is an astropy quantity[39;49;00m[90m[39;49;00m
[94mif[39;49;00m flux [95mis[39;49;00m [95mnot[39;49;00m [94mNone[39;49;00m:[90m[39;49;00m
[94mif[39;49;00m [95mnot[39;49;00m [96misinstance[39;49;00m(flux, u.Quantity):[90m[39;49;00m
[94mraise[39;49;00m [96mValueError[39;49;00m([33m"[39;49;00m[33mFlux must be a `Quantity` object.[39;49;00m[33m"[39;49;00m)[90m[39;49;00m
[94melif[39;49;00m flux.isscalar:[90m[39;49;00m
flux = u.Quantity([flux])[90m[39;49;00m
[90m[39;49;00m
[90m# Ensure that only one or neither of these parameters is set[39;49;00m[90m[39;49;00m
[94mif[39;49;00m redshift [95mis[39;49;00m [95mnot[39;49;00m [94mNone[39;49;00m [95mand[39;49;00m radial_velocity [95mis[39;49;00m [95mnot[39;49;00m [94mNone[39;49;00m:[90m[39;49;00m
[94mraise[39;49;00m [96mValueError[39;49;00m([33m"[39;49;00m[33mCannot set both radial_velocity and redshift at [39;49;00m[33m"[39;49;00m[90m[39;49;00m
[33m"[39;49;00m[33mthe same time.[39;49;00m[33m"[39;49;00m)[90m[39;49;00m
[90m[39;49;00m
[90m# In cases of slicing, new objects will be initialized with `data`[39;49;00m[90m[39;49;00m
[90m# instead of ``flux``. Ensure we grab the `data` argument.[39;49;00m[90m[39;49;00m
[94mif[39;49;00m flux [95mis[39;49;00m [94mNone[39;49;00m [95mand[39;49;00m [33m'[39;49;00m[33mdata[39;49;00m[33m'[39;49;00m [95min[39;49;00m kwargs:[90m[39;49;00m
flux = kwargs.pop([33m'[39;49;00m[33mdata[39;49;00m[33m'[39;49;00m)[90m[39;49;00m
[90m[39;49;00m
[90m# Ensure that the unit information codified in the quantity object is[39;49;00m[90m[39;49;00m
[90m# the One True Unit.[39;49;00m[90m[39;49;00m
kwargs.setdefault([33m'[39;49;00m[33munit[39;49;00m[33m'[39;49;00m, flux.unit [94mif[39;49;00m [96misinstance[39;49;00m(flux, u.Quantity)[90m[39;49;00m
[94melse[39;49;00m kwargs.get([33m'[39;49;00m[33munit[39;49;00m[33m'[39;49;00m))[90m[39;49;00m
[90m[39;49;00m
[90m# In the case where the arithmetic operation is being performed with[39;49;00m[90m[39;49;00m
[90m# a single float, int, or array object, just go ahead and ignore wcs[39;49;00m[90m[39;49;00m
[90m# requirements[39;49;00m[90m[39;49;00m
[94mif[39;49;00m np.ndim(flux) == [94m0[39;49;00m [95mand[39;49;00m spectral_axis [95mis[39;49;00m [94mNone[39;49;00m [95mand[39;49;00m wcs [95mis[39;49;00m [94mNone[39;49;00m:[90m[39;49;00m
[96msuper[39;49;00m(Spectrum, [96mself[39;49;00m).[92m__init__[39;49;00m(data=flux, wcs=wcs, **kwargs)[90m[39;49;00m
[94mreturn[39;49;00m[90m[39;49;00m
[90m[39;49;00m
[94mif[39;49;00m rest_value [95mis[39;49;00m [94mNone[39;49;00m:[90m[39;49;00m
[94mif[39;49;00m [96mhasattr[39;49;00m(wcs, [33m'[39;49;00m[33mrest_frequency[39;49;00m[33m'[39;49;00m) [95mand[39;49;00m wcs.rest_frequency != [94m0[39;49;00m:[90m[39;49;00m
rest_value = wcs.rest_frequency * u.Hz[90m[39;49;00m
[94melif[39;49;00m [96mhasattr[39;49;00m(wcs, [33m'[39;49;00m[33mrest_wavelength[39;49;00m[33m'[39;49;00m) [95mand[39;49;00m wcs.rest_wavelength != [94m0[39;49;00m:[90m[39;49;00m
rest_value = wcs.rest_wavelength * u.AA[90m[39;49;00m
[94melif[39;49;00m [96mhasattr[39;49;00m(wcs, [33m'[39;49;00m[33mwcs[39;49;00m[33m'[39;49;00m) [95mand[39;49;00m [96mhasattr[39;49;00m(wcs.wcs, [33m'[39;49;00m[33mrestfrq[39;49;00m[33m'[39;49;00m) [95mand[39;49;00m wcs.wcs.restfrq > [94m0[39;49;00m:[90m[39;49;00m
rest_value = wcs.wcs.restfrq * u.Hz[90m[39;49;00m
[94melif[39;49;00m [96mhasattr[39;49;00m(wcs, [33m'[39;49;00m[33mwcs[39;49;00m[33m'[39;49;00m) [95mand[39;49;00m [96mhasattr[39;49;00m(wcs.wcs, [33m'[39;49;00m[33mrestwav[39;49;00m[33m'[39;49;00m) [95mand[39;49;00m wcs.wcs.restwav > [94m0[39;49;00m:[90m[39;49;00m
rest_value = wcs.wcs.restwav * u.m[90m[39;49;00m
[94melse[39;49;00m:[90m[39;49;00m
rest_value = [94mNone[39;49;00m[90m[39;49;00m
[94melse[39;49;00m:[90m[39;49;00m
[94mif[39;49;00m [95mnot[39;49;00m [96misinstance[39;49;00m(rest_value, u.Quantity):[90m[39;49;00m
warnings.warn([33m"[39;49;00m[33mNo unit information provided with rest value. [39;49;00m[33m"[39;49;00m[90m[39;49;00m
[33mf[39;49;00m[33m"[39;49;00m[33mAssuming units of spectral axis ([39;49;00m[33m'[39;49;00m[33m{[39;49;00mspectral_axis.unit[33m}[39;49;00m[33m'[39;49;00m[33m).[39;49;00m[33m"[39;49;00m)[90m[39;49;00m
rest_value = u.Quantity(rest_value, spectral_axis.unit)[90m[39;49;00m
[94melif[39;49;00m [95mnot[39;49;00m rest_value.unit.is_equivalent(u.AA, equivalencies=u.spectral()):[90m[39;49;00m
[94mraise[39;49;00m u.UnitsError([33m"[39;49;00m[33mRest value must be [39;49;00m[33m"[39;49;00m[90m[39;49;00m
[33m"[39;49;00m[33menergy/wavelength/frequency equivalent.[39;49;00m[33m"[39;49;00m)[90m[39;49;00m
[90m[39;49;00m
[90m# If flux and spectral axis are both specified, check that their lengths[39;49;00m[90m[39;49;00m
[90m# match or are off by one (implying the spectral axis stores bin edges).[39;49;00m[90m[39;49;00m
[90m# If we can't determine which flux axis corresponds to the spectral axis[39;49;00m[90m[39;49;00m
[90m# we raise an error.[39;49;00m[90m[39;49;00m
[94mif[39;49;00m flux [95mis[39;49;00m [95mnot[39;49;00m [94mNone[39;49;00m [95mand[39;49;00m spectral_axis [95mis[39;49;00m [95mnot[39;49;00m [94mNone[39;49;00m:[90m[39;49;00m
[94mif[39;49;00m spectral_axis_index [95mis[39;49;00m [94mNone[39;49;00m:[90m[39;49;00m
[94mif[39;49;00m flux.ndim == [94m1[39;49;00m:[90m[39;49;00m
[96mself[39;49;00m._spectral_axis_index = [94m0[39;49;00m[90m[39;49;00m
[94melse[39;49;00m:[90m[39;49;00m
matching_axes = [][90m[39;49;00m
[94mif[39;49;00m bin_specification == [33m"[39;49;00m[33mcenters[39;49;00m[33m"[39;49;00m:[90m[39;49;00m
add_elements = [[94m0[39;49;00m,][90m[39;49;00m
[94melif[39;49;00m bin_specification == [33m"[39;49;00m[33medges[39;49;00m[33m"[39;49;00m:[90m[39;49;00m
add_elements = [[94m1[39;49;00m,][90m[39;49;00m
[94melif[39;49;00m bin_specification [95mis[39;49;00m [94mNone[39;49;00m:[90m[39;49;00m
add_elements = [[94m0[39;49;00m,[94m1[39;49;00m][90m[39;49;00m
[94mfor[39;49;00m i [95min[39;49;00m [96mrange[39;49;00m(flux.ndim):[90m[39;49;00m
[94mfor[39;49;00m add_element [95min[39;49;00m add_elements:[90m[39;49;00m
[94mif[39;49;00m spectral_axis.shape[[94m0[39;49;00m] == flux.shape[i] + add_element:[90m[39;49;00m
matching_axes.append(i)[90m[39;49;00m
[90m[39;49;00m
[94mif[39;49;00m [96mlen[39;49;00m(matching_axes) == [94m1[39;49;00m:[90m[39;49;00m
[96mself[39;49;00m._spectral_axis_index = matching_axes[[94m0[39;49;00m][90m[39;49;00m
[94melse[39;49;00m:[90m[39;49;00m
> [94mraise[39;49;00m [96mValueError[39;49;00m([33m"[39;49;00m[33mUnable to determine which flux axis corresponds to [39;49;00m[33m"[39;49;00m[90m[39;49;00m
[33m"[39;49;00m[33mthe spectral axis. Please specify spectral_axis_index[39;49;00m[33m"[39;49;00m[90m[39;49;00m
[33m"[39;49;00m[33m or provide a spectral_axis matching a flux axis.[39;49;00m[33m"[39;49;00m)[90m[39;49;00m
[1m[31mE ValueError: Unable to determine which flux axis corresponds to the spectral axis. Please specify spectral_axis_index or provide a spectral_axis matching a flux axis.[0m
[1m[31m/usr/lib/python3/dist-packages/specutils/spectra/spectrum.py[0m:213: ValueError
[33mDuring handling of the above exception, another exception occurred:[0m
self = <specreduce.tests.test_utils.TestMeasureCrossDispersionProfile object at 0x7f8286e22050>
[0m[94mdef[39;49;00m [92mtest_errors_warnings[39;49;00m([96mself[39;49;00m):[90m[39;49;00m
img = mk_gaussian_img(nrows=[94m10[39;49;00m, ncols=[94m10[39;49;00m)[90m[39;49;00m
[94mwith[39;49;00m pytest.raises([96mValueError[39;49;00m,[90m[39;49;00m
match=[33m'[39;49;00m[33m`crossdisp_axis` must be 0 or 1[39;49;00m[33m'[39;49;00m):[90m[39;49;00m
measure_cross_dispersion_profile(img, crossdisp_axis=[94m2[39;49;00m)[90m[39;49;00m
[90m[39;49;00m
> [94mwith[39;49;00m pytest.raises([96mValueError[39;49;00m, match=[33m'[39;49;00m[33m`trace` must be Trace object, [39;49;00m[33m'[39;49;00m[90m[39;49;00m
[33m'[39;49;00m[33mnumber to specify the location [39;49;00m[33m'[39;49;00m[90m[39;49;00m
[33m'[39;49;00m[33mof a FlatTrace, or None to use [39;49;00m[33m'[39;49;00m[90m[39;49;00m
[33m'[39;49;00m[33mcenter of image.[39;49;00m[33m'[39;49;00m):[90m[39;49;00m
[1m[31mE AssertionError: Regex pattern did not match.[0m
[1m[31mE Regex: '`trace` must be Trace object, number to specify the location of a FlatTrace, or None to use center of image.'[0m
[1m[31mE Input: 'Unable to determine which flux axis corresponds to the spectral axis. Please specify spectral_axis_index or provide a spectral_axis matching a flux axis.'[0m
[1m[31mspecreduce/tests/test_utils.py[0m:143: AssertionError
[36m[1m=========================== short test summary info ============================[0m
[31mFAILED[0m specreduce/tests/test_background.py::[1mTestMasksBackground::test_fully_masked_column[apply][0m - ValueError: Unable to determine which flux axis corresponds to the spectral...
[31mFAILED[0m specreduce/tests/test_background.py::[1mTestMasksBackground::test_fully_masked_column[propagate][0m - ValueError: Unable to determine which flux axis corresponds to the spectral...
[31mFAILED[0m specreduce/tests/test_background.py::[1mTestMasksBackground::test_fully_masked_column[zero_fill][0m - ValueError: Unable to determine which flux axis corresponds to the spectral...
[31mFAILED[0m specreduce/tests/test_background.py::[1mTestMasksBackground::test_fully_masked_image[apply][0m - AssertionError: Regex pattern did not match.
[31mFAILED[0m specreduce/tests/test_background.py::[1mTestMasksBackground::test_fully_masked_image[propagate][0m - AssertionError: Regex pattern did not match.
[31mFAILED[0m specreduce/tests/test_background.py::[1mTestMasksBackground::test_mask_treatment_bkg_img_spectrum[apply-expected0][0m - ValueError: Unable to determine which flux axis corresponds to the spectral...
[31mFAILED[0m specreduce/tests/test_background.py::[1mTestMasksBackground::test_mask_treatment_bkg_img_spectrum[propagate-expected1][0m - ValueError: Unable to determine which flux axis corresponds to the spectral...
[31mFAILED[0m specreduce/tests/test_background.py::[1mTestMasksBackground::test_mask_treatment_bkg_img_spectrum[zero_fill-expected2][0m - ValueError: Unable to determine which flux axis corresponds to the spectral...
[31mFAILED[0m specreduce/tests/test_background.py::[1mTestMasksBackground::test_sub_bkg_image[0m - ValueError: Unable to determine which flux axis corresponds to the spectral...
[31mFAILED[0m specreduce/tests/test_tracing.py::[1mTestMasksTracing::test_flat_and_basic_trace_mask[0m - ValueError: Unable to determine which flux axis corresponds to the spectral...
[31mFAILED[0m specreduce/tests/test_tracing.py::[1mTestMasksTracing::test_array_trace_masking[0m - ValueError: Unable to determine which flux axis corresponds to the spectral...
[31mFAILED[0m specreduce/tests/test_tracing.py::[1mTestMasksTracing::test_fit_trace_fully_masked_cols[apply][0m - ValueError: Unable to determine which flux axis corresponds to the spectral...
[31mFAILED[0m specreduce/tests/test_tracing.py::[1mTestMasksTracing::test_fit_trace_fully_masked_cols[propagate][0m - ValueError: Unable to determine which flux axis corresponds to the spectral...
[31mFAILED[0m specreduce/tests/test_tracing.py::[1mTestMasksTracing::test_fit_trace_fully_masked_cols[apply_nan_only][0m - ValueError: Unable to determine which flux axis corresponds to the spectral...
[31mFAILED[0m specreduce/tests/test_utils.py::[1mTestMeasureCrossDispersionProfile::test_measure_cross_dispersion_profile[10-None][0m - ValueError: Must specify spectral_axis_index if no WCS or spectral axis is ...
[31mFAILED[0m specreduce/tests/test_utils.py::[1mTestMeasureCrossDispersionProfile::test_measure_cross_dispersion_profile[10-1][0m - ValueError: Must specify spectral_axis_index if no WCS or spectral axis is ...
[31mFAILED[0m specreduce/tests/test_utils.py::[1mTestMeasureCrossDispersionProfile::test_measure_cross_dispersion_profile[10-pixel2][0m - ValueError: Must specify spectral_axis_index if no WCS or spectral axis is ...
[31mFAILED[0m specreduce/tests/test_utils.py::[1mTestMeasureCrossDispersionProfile::test_measure_cross_dispersion_profile[9-None][0m - ValueError: Must specify spectral_axis_index if no WCS or spectral axis is ...
[31mFAILED[0m specreduce/tests/test_utils.py::[1mTestMeasureCrossDispersionProfile::test_measure_cross_dispersion_profile[9-1][0m - ValueError: Must specify spectral_axis_index if no WCS or spectral axis is ...
[31mFAILED[0m specreduce/tests/test_utils.py::[1mTestMeasureCrossDispersionProfile::test_measure_cross_dispersion_profile[9-pixel2][0m - ValueError: Must specify spectral_axis_index if no WCS or spectral axis is ...
[31mFAILED[0m specreduce/tests/test_utils.py::[1mTestMeasureCrossDispersionProfile::test_errors_warnings[0m - AssertionError: Regex pattern did not match.
[31mERROR[0m specreduce/tests/test_background.py::[1mtest_background[0m - ValueError: Must specify spectral_axis_index if no WCS or spectral axis is ...
[31mERROR[0m specreduce/tests/test_background.py::[1mtest_warnings_errors[0m - ValueError: Must specify spectral_axis_index if no WCS or spectral axis is ...
[31mERROR[0m specreduce/tests/test_image_parsing.py::[1mtest_parse_general[0m - ValueError: Must specify spectral_axis_index if no WCS or spectral axis is ...
[31mERROR[0m specreduce/tests/test_image_parsing.py::[1mtest_parse_horne[0m - ValueError: Must specify spectral_axis_index if no WCS or spectral axis is ...
[31m============= [31m[1m21 failed[0m, [32m55 passed[0m, [33m24 skipped[0m, [31m[1m4 errors[0m[31m in 2.95s[0m[31m ==============[0m
E: pybuild pybuild:389: test: plugin pyproject failed with: exit code=1: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.13/build; python3.13 -m pytest
dh_auto_test: error: pybuild --test --test-pytest -i python{version} -p 3.13 returned exit code 13
make: *** [debian/rules:7: binary] Error 25
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2
--------------------------------------------------------------------------------
More information about the Debian-astro-maintainers
mailing list