[Debian-med-packaging] Bug#1136864: dcmstack: FTBFS: E AttributeError: module 'pydicom' has no attribute 'read_file'
Santiago Vila
sanvila at debian.org
Sat May 16 17:27:45 BST 2026
Package: src:dcmstack
Version: 0.9-3
Severity: serious
Tags: ftbfs forky sid
Dear maintainer:
During a rebuild of all packages in unstable, this package failed to build.
Below you will find the last part of the build log (probably the most
relevant part, but not necessarily). If required, the full build log
is available here:
https://people.debian.org/~sanvila/build-logs/202605/
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 cannot 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:dcmstack, so that this is still
visible in the BTS web page for this package.
Thanks.
--------------------------------------------------------------------------------
[...]
debian/rules clean
dh clean --with python3,sphinxdoc --buildsystem=pybuild
dh_auto_clean -O--buildsystem=pybuild
pybuild --clean -i python{version} -p "3.14 3.13" --parallel=2
I: pybuild base:385: python3.14 setup.py clean
/usr/lib/python3/dist-packages/setuptools/_distutils/dist.py:289: UserWarning: Unknown distribution option: 'test_suite'
warnings.warn(msg)
/usr/lib/python3/dist-packages/setuptools/dist.py:759: SetuptoolsDeprecationWarning: License classifiers are deprecated.
!!
********************************************************************************
Please consider removing the following classifiers in favor of a SPDX license expression:
License :: OSI Approved :: MIT License
[... snipped ...]
test/test_cli.py:56: AssertionError
----------------------------- Captured stdout call -----------------------------
No DICOM files found in /tmp/dcmstack_cli_test_innmxkt4dw
__________________________ TestDcmstackCli.test_embed __________________________
self = <test.test_cli.TestDcmstackCli object at 0x7fe50b1b34d0>
def test_embed(self):
nii_paths = make_niftis(self.out_dir, ['--embed'])
> assert len(nii_paths) == 1
E assert 0 == 1
E + where 0 = len([])
test/test_cli.py:60: AssertionError
----------------------------- Captured stdout call -----------------------------
No DICOM files found in /tmp/dcmstack_cli_test_innmxkt4dw
___________________________ TestNitoolCli.test_basic ___________________________
self = <test.test_cli.TestNitoolCli object at 0x7fe50b1b3610>
def test_basic(self):
> nii_path = make_niftis(self.out_dir, ['--embed'])[0]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E IndexError: list index out of range
test/test_cli.py:65: IndexError
----------------------------- Captured stdout call -----------------------------
No DICOM files found in /tmp/dcmstack_cli_test_innmxkt4dw
_______________________________ test_from_dicom ________________________________
def test_from_dicom():
data_dir = path.join(test_dir,
'data',
'dcmstack',
'2D_16Echo_qT2')
src_fn = path.join(data_dir, 'TE_40_SlcPos_-33.707626341697.dcm')
> src_dcm = pydicom.read_file(src_fn)
^^^^^^^^^^^^^^^^^
E AttributeError: module 'pydicom' has no attribute 'read_file'
test/test_dcmmeta.py:1042: AttributeError
_____________________________ test_image_collision _____________________________
def test_image_collision():
dcm_path = path.join(test_dir,
'data',
'dcmstack',
'2D_16Echo_qT2',
'TE_20_SlcPos_-33.707626341697.dcm')
> dcm = pydicom.read_file(dcm_path)
^^^^^^^^^^^^^^^^^
E AttributeError: module 'pydicom' has no attribute 'read_file'
test/test_dcmstack.py:212: AttributeError
________________________ TestParseAndGroup.test_default ________________________
self = <test.test_dcmstack.TestParseAndGroup object at 0x7fe50b07a5d0>
def test_default(self):
> res = dcmstack.parse_and_group(self.in_paths)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
test/test_dcmstack.py:640:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
src_paths = ['/<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_dcmstack/build/test/data/dcmstack/2D_16Echo_qT2/TE_20_Slc...dcmstack-0.9/.pybuild/cpython3_3.13_dcmstack/build/test/data/dcmstack/2D_16Echo_qT2/TE_40_SlcPos_-23.207628249046.dcm']
group_by = ('SeriesInstanceUID', 'SeriesNumber', 'ProtocolName', 'ImageOrientationPatient')
extractor = <dcmstack.extract.MetaExtractor object at 0x7fe50b176ba0>
force = False, warn_on_except = False
close_tests = ('ImageOrientationPatient',)
def parse_and_group(src_paths, group_by=default_group_keys, extractor=None,
force=False, warn_on_except=False,
close_tests=default_close_keys):
'''Parse the given dicom files and group them together. Each group is
stored as a (list) value in a dict where the key is a tuple of values
corresponding to the keys in 'group_by'
Parameters
----------
src_paths : sequence
A list of paths to the source DICOM files.
group_by : tuple
Meta data keys to group data sets with. Any data set with the same
values for these keys will be grouped together. This tuple of values
will also be the key in the result dictionary.
extractor : callable
Should take a pydicom.dataset.Dataset and return a dictionary of the
extracted meta data.
force : bool
Force reading source files even if they do not appear to be DICOM.
warn_on_except : bool
Convert exceptions into warnings, possibly allowing some results to be
returned.
close_tests : sequence
Any `group_by` key listed here is tested with `numpy.allclose` instead
of straight equality when determining group membership.
Returns
-------
groups : dict
A dict mapping tuples of values (corresponding to 'group_by') to groups
of data sets. Each element in the list is a tuple containing the dicom
object, the parsed meta data, and the filename.
'''
if extractor is None:
from .extract import default_extractor
extractor = default_extractor
results = {}
close_elems = {}
for dcm_path in src_paths:
#Read the DICOM file
try:
> dcm = pydicom.read_file(dcm_path, force=force)
^^^^^^^^^^^^^^^^^
E AttributeError: module 'pydicom' has no attribute 'read_file'
dcmstack/dcmstack.py:1046: AttributeError
________________________ TestParseAndStack.test_default ________________________
self = <test.test_dcmstack.TestParseAndStack object at 0x7fe50b07a710>
def test_default(self):
> res = dcmstack.parse_and_stack(self.in_paths)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
test/test_dcmstack.py:666:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
dcmstack/dcmstack.py:1156: in parse_and_stack
results = parse_and_group(src_paths,
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
src_paths = ['/<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_dcmstack/build/test/data/dcmstack/2D_16Echo_qT2/TE_20_Slc...dcmstack-0.9/.pybuild/cpython3_3.13_dcmstack/build/test/data/dcmstack/2D_16Echo_qT2/TE_40_SlcPos_-23.207628249046.dcm']
group_by = ('SeriesInstanceUID', 'SeriesNumber', 'ProtocolName', 'ImageOrientationPatient')
extractor = <dcmstack.extract.MetaExtractor object at 0x7fe50b176ba0>
force = False, warn_on_except = False
close_tests = ('ImageOrientationPatient',)
def parse_and_group(src_paths, group_by=default_group_keys, extractor=None,
force=False, warn_on_except=False,
close_tests=default_close_keys):
'''Parse the given dicom files and group them together. Each group is
stored as a (list) value in a dict where the key is a tuple of values
corresponding to the keys in 'group_by'
Parameters
----------
src_paths : sequence
A list of paths to the source DICOM files.
group_by : tuple
Meta data keys to group data sets with. Any data set with the same
values for these keys will be grouped together. This tuple of values
will also be the key in the result dictionary.
extractor : callable
Should take a pydicom.dataset.Dataset and return a dictionary of the
extracted meta data.
force : bool
Force reading source files even if they do not appear to be DICOM.
warn_on_except : bool
Convert exceptions into warnings, possibly allowing some results to be
returned.
close_tests : sequence
Any `group_by` key listed here is tested with `numpy.allclose` instead
of straight equality when determining group membership.
Returns
-------
groups : dict
A dict mapping tuples of values (corresponding to 'group_by') to groups
of data sets. Each element in the list is a tuple containing the dicom
object, the parsed meta data, and the filename.
'''
if extractor is None:
from .extract import default_extractor
extractor = default_extractor
results = {}
close_elems = {}
for dcm_path in src_paths:
#Read the DICOM file
try:
> dcm = pydicom.read_file(dcm_path, force=force)
^^^^^^^^^^^^^^^^^
E AttributeError: module 'pydicom' has no attribute 'read_file'
dcmstack/dcmstack.py:1046: AttributeError
=============================== warnings summary ===============================
.pybuild/cpython3_3.13_dcmstack/build/test/test_cli.py::TestDcmstackCli::test_basic
.pybuild/cpython3_3.13_dcmstack/build/test/test_cli.py::TestDcmstackCli::test_embed
.pybuild/cpython3_3.13_dcmstack/build/test/test_cli.py::TestNitoolCli::test_basic
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_dcmstack/build/dcmstack/dcmstack.py:1049: UserWarning: Error reading file /tmp/dcmstack_cli_test_innmxkt4dw/TE_20_SlcPos_-23.207628249046.dcm: module 'pydicom' has no attribute 'read_file'
warnings.warn('Error reading file %s: %s' % (dcm_path, str(e)))
.pybuild/cpython3_3.13_dcmstack/build/test/test_cli.py::TestDcmstackCli::test_basic
.pybuild/cpython3_3.13_dcmstack/build/test/test_cli.py::TestDcmstackCli::test_embed
.pybuild/cpython3_3.13_dcmstack/build/test/test_cli.py::TestNitoolCli::test_basic
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_dcmstack/build/dcmstack/dcmstack.py:1049: UserWarning: Error reading file /tmp/dcmstack_cli_test_innmxkt4dw/TE_20_SlcPos_-33.707626341697.dcm: module 'pydicom' has no attribute 'read_file'
warnings.warn('Error reading file %s: %s' % (dcm_path, str(e)))
.pybuild/cpython3_3.13_dcmstack/build/test/test_cli.py::TestDcmstackCli::test_basic
.pybuild/cpython3_3.13_dcmstack/build/test/test_cli.py::TestDcmstackCli::test_embed
.pybuild/cpython3_3.13_dcmstack/build/test/test_cli.py::TestNitoolCli::test_basic
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_dcmstack/build/dcmstack/dcmstack.py:1049: UserWarning: Error reading file /tmp/dcmstack_cli_test_innmxkt4dw/TE_40_SlcPos_-33.707626341697.dcm: module 'pydicom' has no attribute 'read_file'
warnings.warn('Error reading file %s: %s' % (dcm_path, str(e)))
.pybuild/cpython3_3.13_dcmstack/build/test/test_cli.py::TestDcmstackCli::test_basic
.pybuild/cpython3_3.13_dcmstack/build/test/test_cli.py::TestDcmstackCli::test_embed
.pybuild/cpython3_3.13_dcmstack/build/test/test_cli.py::TestNitoolCli::test_basic
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_dcmstack/build/dcmstack/dcmstack.py:1049: UserWarning: Error reading file /tmp/dcmstack_cli_test_innmxkt4dw/TE_40_SlcPos_-23.207628249046.dcm: module 'pydicom' has no attribute 'read_file'
warnings.warn('Error reading file %s: %s' % (dcm_path, str(e)))
.pybuild/cpython3_3.13_dcmstack/build/test/test_dcmstack.py::test_fsl_hack
.pybuild/cpython3_3.13_dcmstack/build/test/test_dcmstack.py::test_pix_overflow
/usr/lib/python3/dist-packages/pydicom/dataset.py:1378: DeprecationWarning: 'Dataset.is_little_endian' will be removed in v4.0, set the Transfer Syntax UID or use the 'little_endian' argument with Dataset.save_as() or dcmwrite() instead
warn_and_log(
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ============================
FAILED test/test_cli.py::TestDcmstackCli::test_basic - assert 0 == 1
FAILED test/test_cli.py::TestDcmstackCli::test_embed - assert 0 == 1
FAILED test/test_cli.py::TestNitoolCli::test_basic - IndexError: list index o...
FAILED test/test_dcmmeta.py::test_from_dicom - AttributeError: module 'pydico...
FAILED test/test_dcmstack.py::test_image_collision - AttributeError: module '...
FAILED test/test_dcmstack.py::TestParseAndGroup::test_default - AttributeErro...
FAILED test/test_dcmstack.py::TestParseAndStack::test_default - AttributeErro...
ERROR test/test_dcmstack.py::TestIncongruentImage::test_rows - AttributeError...
ERROR test/test_dcmstack.py::TestIncongruentImage::test_columns - AttributeEr...
ERROR test/test_dcmstack.py::TestIncongruentImage::test_pix_space - Attribute...
ERROR test/test_dcmstack.py::TestIncongruentImage::test_close_pix_space - Att...
ERROR test/test_dcmstack.py::TestIncongruentImage::test_orientation - Attribu...
ERROR test/test_dcmstack.py::TestIncongruentImage::test_close_orientation - A...
ERROR test/test_dcmstack.py::TestInvalidStack::test_empty - AttributeError: m...
ERROR test/test_dcmstack.py::TestInvalidStack::test_missing_slice - Attribute...
ERROR test/test_dcmstack.py::TestInvalidStack::test_wrong_number_of_files - A...
ERROR test/test_dcmstack.py::TestInvalidStack::test_vector_var_over_vol - Att...
ERROR test/test_dcmstack.py::TestGetShape::test_single_slice - AttributeError...
ERROR test/test_dcmstack.py::TestGetShape::test_three_dim - AttributeError: m...
ERROR test/test_dcmstack.py::TestGetShape::test_four_dim - AttributeError: mo...
ERROR test/test_dcmstack.py::TestGetShape::test_five_dim - AttributeError: mo...
ERROR test/test_dcmstack.py::TestGuessDim::test_single_guess - AttributeError...
ERROR test/test_dcmstack.py::TestGuessDim::test_wrong_guess_first - Attribute...
ERROR test/test_dcmstack.py::TestGetData::test_single_slice - AttributeError:...
ERROR test/test_dcmstack.py::TestGetData::test_three_dim - AttributeError: mo...
ERROR test/test_dcmstack.py::TestGetData::test_four_dim - AttributeError: mod...
ERROR test/test_dcmstack.py::TestGetData::test_five_dim - AttributeError: mod...
ERROR test/test_dcmstack.py::TestGetAffine::test_single_slice - AttributeErro...
ERROR test/test_dcmstack.py::TestGetAffine::test_three_dim - AttributeError: ...
ERROR test/test_dcmstack.py::TestToNifti::test_single_slice - AttributeError:...
ERROR test/test_dcmstack.py::TestToNifti::test_single_vol - AttributeError: m...
ERROR test/test_dcmstack.py::TestToNifti::test_slice_dim_reorient - Attribute...
ERROR test/test_dcmstack.py::TestToNifti::test_two_time_vol - AttributeError:...
ERROR test/test_dcmstack.py::TestToNifti::test_two_vector_vol - AttributeErro...
ERROR test/test_extract.py::TestCsa::test_simplify - AttributeError: module '...
ERROR test/test_extract.py::TestCsa::test_csa_image_trans - AttributeError: m...
ERROR test/test_extract.py::TestCsa::test_parse_phx_line - AttributeError: mo...
ERROR test/test_extract.py::TestCsa::test_csa_series_trans - AttributeError: ...
ERROR test/test_extract.py::TestMetaExtractor::test_get_elem_key - AttributeE...
ERROR test/test_extract.py::TestMetaExtractor::test_get_elem_value - Attribut...
ERROR test/test_extract.py::TestMetaExtractor::test_dup_trans - AttributeErro...
ERROR test/test_extract.py::TestMetaExtractor::test_reloc_private - Attribute...
ERROR test/test_extract.py::TestMetaExtractor::test_non_reloc_private - Attri...
============= 7 failed, 88 passed, 14 warnings, 36 errors in 0.70s =============
E: pybuild pybuild:485: test: plugin distutils failed with: exit code=1: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_dcmstack/build; python3.13 -m pytest test
rm -fr -- /tmp/dh-xdg-rundir-iH1DLbmb
dh_auto_test: error: pybuild --test --test-pytest -i python{version} -p "3.14 3.13" --parallel=2 returned exit code 13
make: *** [debian/rules:8: binary] Error 25
dpkg-buildpackage: error: debian/rules binary subprocess failed with exit status 2
--------------------------------------------------------------------------------
More information about the Debian-med-packaging
mailing list