Discussion:
Bug#948877: pydicom ftbfs in unstable (test failures)
Add Reply
Matthias Klose
2020-01-14 12:10:01 UTC
Reply
Permalink
Package: src:pydicom
Version: 1.2.1-1
Severity: serious
Tags: sid bullseye

pydicom ftbfs in unstable (test failures)

[...]
fp = <pydicom.filebase.DicomBytesIO object at 0x7fdffe3f3e20>
dataset = <[RecursionError("With tag (3006, 0040) got exception: With tag (3006,
0048) got exception: maximum recursion depth ex...65 more times]
RecursionError: maximum recursion depth exceeded

") raised in repr()] Dataset object at 0x7fdffed318e0>
parent_encoding = ['iso8859']

def write_dataset(fp, dataset, parent_encoding=default_encoding):
"""Write a Dataset dictionary to the file. Return the total length written.

Attempt to correct ambiguous VR elements when explicit little/big
encoding Elements that can't be corrected will be returned unchanged.
"""
_harmonize_properties(dataset, fp)

if not fp.is_implicit_VR and not dataset.is_original_encoding:
dataset = correct_ambiguous_vr(dataset, fp.is_little_endian)

dataset_encoding = dataset.get('SpecificCharacterSet', parent_encoding)

fpStart = fp.tell()
# data_elements must be written in tag order
tags = sorted(dataset.keys())

for tag in tags:
# do not write retired Group Length (see PS3.5, 7.2)
if tag.element == 0 and tag.group > 6:
continue
write_data_element(fp, dataset.get_item(tag), dataset_encoding)
pydicom/filewriter.py:521:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <contextlib._GeneratorContextManager object at 0x7fdffe3f30d0>
type = <class 'RecursionError'>
value = RecursionError('With tag (3006, 0048) got exception: maximum recursion
depth exceeded\nTraceback (most recent call las....__str__(self) + "\\""\n
[Previous line repeated 467 more times]\nRecursionError: maximum recursion depth
exceeded\n')
traceback = <traceback object at 0x7fdffeb64c80>

def __exit__(self, type, value, traceback):
if type is None:
try:
next(self.gen)
except StopIteration:
return False
else:
raise RuntimeError("generator didn't stop")
else:
if value is None:
# Need to force instantiation so we can reliably
# tell if we get the same exception back
value = type()
self.gen.throw(type, value, traceback)
/usr/lib/python3.8/contextlib.py:131:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

tag = (3006, 0040)

@contextmanager
def tag_in_exception(tag):
"""Use `tag` within a context.

Used to include the tag details in the traceback message when an exception
is raised within the context.

Parameters
----------
tag : pydicom.tag.Tag
The tag to use in the context.
"""
try:
yield
except Exception as ex:
stack_trace = traceback.format_exc()
msg = 'With tag {0} got exception: {1}\n{2}'.format(
tag,
str(ex),
stack_trace)
raise type(ex)(msg)
E RecursionError: With tag (3006, 0040) got exception: With tag (3006,
0048) got exception: maximum recursion depth exceeded
E Traceback (most recent call last):
E File
"/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_pydicom/build/pydicom/tag.py", line 30,
in tag_in_exception
E yield
E File
"/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_pydicom/build/pydicom/filewriter.py",
line 521, in write_dataset
E write_data_element(fp, dataset.get_item(tag), dataset_encoding)
E File
"/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_pydicom/build/pydicom/filewriter.py",
line 471, in write_data_element
E writer_function(buffer, data_element)
E File
"/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_pydicom/build/pydicom/filewriter.py",
line 324, in write_number_string
E val = str(val)
E File
"/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_pydicom/build/pydicom/valuerep.py", line
507, in __repr__
E return "\"" + int.__str__(self) + "\""
E File
"/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_pydicom/build/pydicom/valuerep.py", line
507, in __repr__
E return "\"" + int.__str__(self) + "\""
E File
"/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_pydicom/build/pydicom/valuerep.py", line
507, in __repr__
E return "\"" + int.__str__(self) + "\""
E [Previous line repeated 467 more times]
E RecursionError: maximum recursion depth exceeded
E
E Traceback (most recent call last):
E File
"/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_pydicom/build/pydicom/tag.py", line 30,
in tag_in_exception
E yield
E File
"/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_pydicom/build/pydicom/filewriter.py",
line 521, in write_dataset
E write_data_element(fp, dataset.get_item(tag), dataset_encoding)
E File
"/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_pydicom/build/pydicom/filewriter.py",
line 471, in write_data_element
E writer_function(buffer, data_element)
E File
"/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_pydicom/build/pydicom/filewriter.py",
line 324, in write_number_string
E val = str(val)
E File
"/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_pydicom/build/pydicom/valuerep.py", line
507, in __repr__
E return "\"" + int.__str__(self) + "\""
E File
"/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_pydicom/build/pydicom/valuerep.py", line
507, in __repr__
E return "\"" + int.__str__(self) + "\""
E File
"/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_pydicom/build/pydicom/valuerep.py", line
507, in __repr__
E return "\"" + int.__str__(self) + "\""
E [Previous line repeated 467 more times]
E RecursionError: maximum recursion depth exceeded
E
E During handling of the above exception, another exception occurred:
E
E Traceback (most recent call last):
E File
"/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_pydicom/build/pydicom/tag.py", line 30,
in tag_in_exception
E yield
E File
"/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_pydicom/build/pydicom/filewriter.py",
line 521, in write_dataset
E write_data_element(fp, dataset.get_item(tag), dataset_encoding)
E File
"/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_pydicom/build/pydicom/filewriter.py",
line 464, in write_data_element
E writer_function(buffer, data_element, encodings=encodings)
E File
"/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_pydicom/build/pydicom/filewriter.py",
line 548, in write_sequence
E write_sequence_item(fp, dataset, encodings)
E File
"/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_pydicom/build/pydicom/filewriter.py",
line 563, in write_sequence_item
E write_dataset(fp, dataset, parent_encoding=encodings)
E File
"/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_pydicom/build/pydicom/filewriter.py",
line 521, in write_dataset
E write_data_element(fp, dataset.get_item(tag), dataset_encoding)
E File "/usr/lib/python3.8/contextlib.py", line 131, in __exit__
E self.gen.throw(type, value, traceback)
E File
"/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_pydicom/build/pydicom/tag.py", line 37,
in tag_in_exception
E raise type(ex)(msg)
E RecursionError: With tag (3006, 0048) got exception: maximum
recursion depth exceeded
E Traceback (most recent call last):
E File
"/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_pydicom/build/pydicom/tag.py", line 30,
in tag_in_exception
E yield
E File
"/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_pydicom/build/pydicom/filewriter.py",
line 521, in write_dataset
E write_data_element(fp, dataset.get_item(tag), dataset_encoding)
E File
"/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_pydicom/build/pydicom/filewriter.py",
line 471, in write_data_element
E writer_function(buffer, data_element)
E File
"/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_pydicom/build/pydicom/filewriter.py",
line 324, in write_number_string
E val = str(val)
E File
"/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_pydicom/build/pydicom/valuerep.py", line
507, in __repr__
E return "\"" + int.__str__(self) + "\""
E File
"/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_pydicom/build/pydicom/valuerep.py", line
507, in __repr__
E return "\"" + int.__str__(self) + "\""
E File
"/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_pydicom/build/pydicom/valuerep.py", line
507, in __repr__
E return "\"" + int.__str__(self) + "\""
E [Previous line repeated 467 more times]
E RecursionError: maximum recursion depth exceeded

pydicom/tag.py:37: RecursionError

During handling of the above exception, another exception occurred:

self = <pydicom.tests.test_filewriter.TestScratchWrite object at 0x7fdffed31070>

def testImpl_LE_deflen_write(self):
"""Scratch Write for implicit VR little endian, defined length SQs"""
file_ds = FileDataset("test", self.ds)
self.compare_write(impl_LE_deflen_std_hex, file_ds)
pydicom/tests/test_filewriter.py:1002:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
pydicom/tests/test_filewriter.py:987: in compare_write
file_ds.save_as(out_filename, write_like_original=True)
pydicom/dataset.py:1088: in save_as
pydicom.dcmwrite(filename, self, write_like_original)
pydicom/filewriter.py:888: in dcmwrite
write_dataset(fp, get_item(dataset, slice(0x00010000, None)))
pydicom/filewriter.py:521: in write_dataset
write_data_element(fp, dataset.get_item(tag), dataset_encoding)
/usr/lib/python3.8/contextlib.py:131: in __exit__
self.gen.throw(type, value, traceback)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

tag = (3006, 0039)

@contextmanager
def tag_in_exception(tag):
"""Use `tag` within a context.

Used to include the tag details in the traceback message when an exception
is raised within the context.

Parameters
----------
tag : pydicom.tag.Tag
The tag to use in the context.
"""
try:
yield
except Exception as ex:
stack_trace = traceback.format_exc()
msg = 'With tag {0} got exception: {1}\n{2}'.format(
tag,
str(ex),
stack_trace)
raise type(ex)(msg)
E RecursionError: With tag (3006, 0039) got exception: With tag (3006,
0040) got exception: With tag (3006, 0048) got exception: maximum recursion
depth exceeded
E Traceback (most recent call last):
E File
"/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_pydicom/build/pydicom/tag.py", line 30,
in tag_in_exception
E yield
E File
"/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_pydicom/build/pydicom/filewriter.py",
line 521, in write_dataset
E write_data_element(fp, dataset.get_item(tag), dataset_encoding)
E File
"/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_pydicom/build/pydicom/filewriter.py",
line 471, in write_data_element
E writer_function(buffer, data_element)
E File
"/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_pydicom/build/pydicom/filewriter.py",
line 324, in write_number_string
E val = str(val)
E File
"/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_pydicom/build/pydicom/valuerep.py", line
507, in __repr__
E return "\"" + int.__str__(self) + "\""
E File
"/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_pydicom/build/pydicom/valuerep.py", line
507, in __repr__
E return "\"" + int.__str__(self) + "\""
E File
"/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_pydicom/build/pydicom/valuerep.py", line
507, in __repr__
E return "\"" + int.__str__(self) + "\""
E [Previous line repeated 467 more times]
E RecursionError: maximum recursion depth exceeded
E
E Traceback (most recent call last):
E File
"/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_pydicom/build/pydicom/tag.py", line 30,
in tag_in_exception
E yield
E File
"/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_pydicom/build/pydicom/filewriter.py",
line 521, in write_dataset
E write_data_element(fp, dataset.get_item(tag), dataset_encoding)
E File
"/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_pydicom/build/pydicom/filewriter.py",
line 471, in write_data_element
E writer_function(buffer, data_element)
E File
"/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_pydicom/build/pydicom/filewriter.py",
line 324, in write_number_string
E val = str(val)
E File
"/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_pydicom/build/pydicom/valuerep.py", line
507, in __repr__
E return "\"" + int.__str__(self) + "\""
E File
"/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_pydicom/build/pydicom/valuerep.py", line
507, in __repr__
E return "\"" + int.__str__(self) + "\""
E File
"/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_pydicom/build/pydicom/valuerep.py", line
507, in __repr__
E return "\"" + int.__str__(self) + "\""
E [Previous line repeated 467 more times]
E RecursionError: maximum recursion depth exceeded
E
E During handling of the above exception, another exception occurred:
E
E Traceback (most recent call last):
E File
"/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_pydicom/build/pydicom/tag.py", line 30,
in tag_in_exception
E yield
E File
"/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_pydicom/build/pydicom/filewriter.py",
line 521, in write_dataset
E write_data_element(fp, dataset.get_item(tag), dataset_encoding)
E File
"/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_pydicom/build/pydicom/filewriter.py",
line 464, in write_data_element
E writer_function(buffer, data_element, encodings=encodings)
E File
"/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_pydicom/build/pydicom/filewriter.py",
line 548, in write_sequence
E write_sequence_item(fp, dataset, encodings)
E File
"/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_pydicom/build/pydicom/filewriter.py",
line 563, in write_sequence_item
E write_dataset(fp, dataset, parent_encoding=encodings)
E File
"/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_pydicom/build/pydicom/filewriter.py",
line 521, in write_dataset
E write_data_element(fp, dataset.get_item(tag), dataset_encoding)
E File "/usr/lib/python3.8/contextlib.py", line 131, in __exit__
E self.gen.throw(type, value, traceback)
E File
"/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_pydicom/build/pydicom/tag.py", line 37,
in tag_in_exception
E raise type(ex)(msg)
E RecursionError: With tag (3006, 0048) got exception: maximum
recursion depth exceeded
E Traceback (most recent call last):
E File
"/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_pydicom/build/pydicom/tag.py", line 30,
in tag_in_exception
E yield
E File
"/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_pydicom/build/pydicom/filewriter.py",
line 521, in write_dataset
E write_data_element(fp, dataset.get_item(tag), dataset_encoding)
E File
"/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_pydicom/build/pydicom/filewriter.py",
line 471, in write_data_element
E writer_function(buffer, data_element)
E File
"/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_pydicom/build/pydicom/filewriter.py",
line 324, in write_number_string
E val = str(val)
E File
"/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_pydicom/build/pydicom/valuerep.py", line
507, in __repr__
E return "\"" + int.__str__(self) + "\""
E File
"/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_pydicom/build/pydicom/valuerep.py", line
507, in __repr__
E return "\"" + int.__str__(self) + "\""
E File
"/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_pydicom/build/pydicom/valuerep.py", line
507, in __repr__
E return "\"" + int.__str__(self) + "\""
E [Previous line repeated 467 more times]
E RecursionError: maximum recursion depth exceeded
E
E
E Traceback (most recent call last):
E File
"/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_pydicom/build/pydicom/tag.py", line 30,
in tag_in_exception
E yield
E File
"/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_pydicom/build/pydicom/filewriter.py",
line 521, in write_dataset
E write_data_element(fp, dataset.get_item(tag), dataset_encoding)
E File
"/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_pydicom/build/pydicom/filewriter.py",
line 471, in write_data_element
E writer_function(buffer, data_element)
E File
"/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_pydicom/build/pydicom/filewriter.py",
line 324, in write_number_string
E val = str(val)
E File
"/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_pydicom/build/pydicom/valuerep.py", line
507, in __repr__
E return "\"" + int.__str__(self) + "\""
E File
"/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_pydicom/build/pydicom/valuerep.py", line
507, in __repr__
E return "\"" + int.__str__(self) + "\""
E File
"/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_pydicom/build/pydicom/valuerep.py", line
507, in __repr__
E return "\"" + int.__str__(self) + "\""
E [Previous line repeated 467 more times]
E RecursionError: maximum recursion depth exceeded
E
E During handling of the above exception, another exception occurred:
E
E Traceback (most recent call last):
E File
"/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_pydicom/build/pydicom/tag.py", line 30,
in tag_in_exception
E yield
E File
"/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_pydicom/build/pydicom/filewriter.py",
line 521, in write_dataset
E write_data_element(fp, dataset.get_item(tag), dataset_encoding)
E File
"/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_pydicom/build/pydicom/filewriter.py",
line 464, in write_data_element
E writer_function(buffer, data_element, encodings=encodings)
E File
"/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_pydicom/build/pydicom/filewriter.py",
line 548, in write_sequence
E write_sequence_item(fp, dataset, encodings)
E File
"/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_pydicom/build/pydicom/filewriter.py",
line 563, in write_sequence_item
E write_dataset(fp, dataset, parent_encoding=encodings)
E File
"/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_pydicom/build/pydicom/filewriter.py",
line 521, in write_dataset
E write_data_element(fp, dataset.get_item(tag), dataset_encoding)
E File "/usr/lib/python3.8/contextlib.py", line 131, in __exit__
E self.gen.throw(type, value, traceback)
E File
"/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_pydicom/build/pydicom/tag.py", line 37,
in tag_in_exception
E raise type(ex)(msg)
E RecursionError: With tag (3006, 0048) got exception: maximum
recursion depth exceeded
E Traceback (most recent call last):
E File
"/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_pydicom/build/pydicom/tag.py", line 30,
in tag_in_exception
E yield
E File
"/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_pydicom/build/pydicom/filewriter.py",
line 521, in write_dataset
E write_data_element(fp, dataset.get_item(tag), dataset_encoding)
E File
"/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_pydicom/build/pydicom/filewriter.py",
line 471, in write_data_element
E writer_function(buffer, data_element)
E File
"/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_pydicom/build/pydicom/filewriter.py",
line 324, in write_number_string
E val = str(val)
E File
"/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_pydicom/build/pydicom/valuerep.py", line
507, in __repr__
E return "\"" + int.__str__(self) + "\""
E File
"/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_pydicom/build/pydicom/valuerep.py", line
507, in __repr__
E return "\"" + int.__str__(self) + "\""
E File
"/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_pydicom/build/pydicom/valuerep.py", line
507, in __repr__
E return "\"" + int.__str__(self) + "\""
E [Previous line repeated 467 more times]
E RecursionError: maximum recursion depth exceeded
E
E
E During handling of the above exception, another exception occurred:
E
E Traceback (most recent call last):
E File
"/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_pydicom/build/pydicom/tag.py", line 30,
in tag_in_exception
E yield
E File
"/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_pydicom/build/pydicom/filewriter.py",
line 521, in write_dataset
E write_data_element(fp, dataset.get_item(tag), dataset_encoding)
E File
"/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_pydicom/build/pydicom/filewriter.py",
line 464, in write_data_element
E writer_function(buffer, data_element, encodings=encodings)
E File
"/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_pydicom/build/pydicom/filewriter.py",
line 548, in write_sequence
E write_sequence_item(fp, dataset, encodings)
E File
"/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_pydicom/build/pydicom/filewriter.py",
line 563, in write_sequence_item
E write_dataset(fp, dataset, parent_encoding=encodings)
E File
"/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_pydicom/build/pydicom/filewriter.py",
line 521, in write_dataset
E write_data_element(fp, dataset.get_item(tag), dataset_encoding)
E File "/usr/lib/python3.8/contextlib.py", line 131, in __exit__
E self.gen.throw(type, value, traceback)
E File
"/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_pydicom/build/pydicom/tag.py", line 37,
in tag_in_exception
E raise type(ex)(msg)
E RecursionError: With tag (3006, 0040) got exception: With tag (3006,
0048) got exception: maximum recursion depth exceeded
E Traceback (most recent call last):
E File
"/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_pydicom/build/pydicom/tag.py", line 30,
in tag_in_exception
E yield
E File
"/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_pydicom/build/pydicom/filewriter.py",
line 521, in write_dataset
E write_data_element(fp, dataset.get_item(tag), dataset_encoding)
E File
"/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_pydicom/build/pydicom/filewriter.py",
line 471, in write_data_element
E writer_function(buffer, data_element)
E File
"/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_pydicom/build/pydicom/filewriter.py",
line 324, in write_number_string
E val = str(val)
E File
"/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_pydicom/build/pydicom/valuerep.py", line
507, in __repr__
E return "\"" + int.__str__(self) + "\""
E File
"/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_pydicom/build/pydicom/valuerep.py", line
507, in __repr__
E return "\"" + int.__str__(self) + "\""
E File
"/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_pydicom/build/pydicom/valuerep.py", line
507, in __repr__
E return "\"" + int.__str__(self) + "\""
E [Previous line repeated 467 more times]
E RecursionError: maximum recursion depth exceeded
E
E Traceback (most recent call last):
E File
"/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_pydicom/build/pydicom/tag.py", line 30,
in tag_in_exception
E yield
E File
"/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_pydicom/build/pydicom/filewriter.py",
line 521, in write_dataset
E write_data_element(fp, dataset.get_item(tag), dataset_encoding)
E File
"/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_pydicom/build/pydicom/filewriter.py",
line 471, in write_data_element
E writer_function(buffer, data_element)
E File
"/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_pydicom/build/pydicom/filewriter.py",
line 324, in write_number_string
E val = str(val)
E File
"/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_pydicom/build/pydicom/valuerep.py", line
507, in __repr__
E return "\"" + int.__str__(self) + "\""
E File
"/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_pydicom/build/pydicom/valuerep.py", line
507, in __repr__
E return "\"" + int.__str__(self) + "\""
E File
"/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_pydicom/build/pydicom/valuerep.py", line
507, in __repr__
E return "\"" + int.__str__(self) + "\""
E [Previous line repeated 467 more times]
E RecursionError: maximum recursion depth exceeded
E
E During handling of the above exception, another exception occurred:
E
E Traceback (most recent call last):
E File
"/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_pydicom/build/pydicom/tag.py", line 30,
in tag_in_exception
E yield
E File
"/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_pydicom/build/pydicom/filewriter.py",
line 521, in write_dataset
E write_data_element(fp, dataset.get_item(tag), dataset_encoding)
E File
"/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_pydicom/build/pydicom/filewriter.py",
line 464, in write_data_element
E writer_function(buffer, data_element, encodings=encodings)
E File
"/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_pydicom/build/pydicom/filewriter.py",
line 548, in write_sequence
E write_sequence_item(fp, dataset, encodings)
E File
"/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_pydicom/build/pydicom/filewriter.py",
line 563, in write_sequence_item
E write_dataset(fp, dataset, parent_encoding=encodings)
E File
"/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_pydicom/build/pydicom/filewriter.py",
line 521, in write_dataset
E write_data_element(fp, dataset.get_item(tag), dataset_encoding)
E File "/usr/lib/python3.8/contextlib.py", line 131, in __exit__
E self.gen.throw(type, value, traceback)
E File
"/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_pydicom/build/pydicom/tag.py", line 37,
in tag_in_exception
E raise type(ex)(msg)
E RecursionError: With tag (3006, 0048) got exception: maximum
recursion depth exceeded
E Traceback (most recent call last):
E File
"/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_pydicom/build/pydicom/tag.py", line 30,
in tag_in_exception
E yield
E File
"/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_pydicom/build/pydicom/filewriter.py",
line 521, in write_dataset
E write_data_element(fp, dataset.get_item(tag), dataset_encoding)
E File
"/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_pydicom/build/pydicom/filewriter.py",
line 471, in write_data_element
E writer_function(buffer, data_element)
E File
"/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_pydicom/build/pydicom/filewriter.py",
line 324, in write_number_string
E val = str(val)
E File
"/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_pydicom/build/pydicom/valuerep.py", line
507, in __repr__
E return "\"" + int.__str__(self) + "\""
E File
"/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_pydicom/build/pydicom/valuerep.py", line
507, in __repr__
E return "\"" + int.__str__(self) + "\""
E File
"/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_pydicom/build/pydicom/valuerep.py", line
507, in __repr__
E return "\"" + int.__str__(self) + "\""
E [Previous line repeated 467 more times]
E RecursionError: maximum recursion depth exceeded

pydicom/tag.py:37: RecursionError
__________ TestNumpy_ReshapePixelArray.test_invalid_nr_frames_raises ___________

self = <pydicom.tests.test_handler_util.TestNumpy_ReshapePixelArray object at
0x7fdffe4e4370>

def test_invalid_nr_frames_raises(self):
"""Test an invalid Number of Frames value raises exception."""
self.ds.SamplesPerPixel = 1
self.ds.NumberOfFrames = 0
# Need to escape brackets
with pytest.raises(ValueError,
reshape_pixel_array(self.ds, RESHAPE_ARRAYS['1frame_1sample'])
pydicom/tests/test_handler_util.py:483:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
pydicom/pixel_data_handlers/util.py:263: in reshape_pixel_array
"Unable to reshape the pixel array as a value of {} for "
pydicom/valuerep.py:507: in __repr__
return "\"" + int.__str__(self) + "\""
pydicom/valuerep.py:507: in __repr__
return "\"" + int.__str__(self) + "\""
E RecursionError: maximum recursion depth exceeded
!!! Recursion detected (same locals & position)
_________________________ MultiValuetests.testSorting __________________________

self = <pydicom.tests.test_multival.MultiValuetests testMethod=testSorting>

def testSorting(self):
"""MultiValue: allow inline sort."""
multival = MultiValue(DS, [12, 33, 5, 7, 1])
multival.sort()
self.assertEqual([1, 5, 7, 12, 33], multival)
multival.sort(reverse=True)
self.assertEqual([33, 12, 7, 5, 1], multival)
multival.sort(key=str)
pydicom/tests/test_multival.py:103:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
pydicom/multival.py:86: in sort
self._list.sort(key=key, reverse=reverse)
pydicom/valuerep.py:344: in __str__
return super(DSfloat, self).__str__()
pydicom/valuerep.py:347: in __repr__
return "\"" + str(self) + "\""
pydicom/valuerep.py:344: in __str__
return super(DSfloat, self).__str__()
E RecursionError: maximum recursion depth exceeded while getting the str of an
object
!!! Recursion detected (same locals & position)
__________________ TestCodify.test_code_dataelem_exclude_size __________________

self = <pydicom.tests.test_util.TestCodify object at 0x7fdffe718490>

def test_code_dataelem_exclude_size(self):
"""Test utils.codify.code_dataelem exclude_size param"""
input_elem = [DataElement(0x00100010, 'OB', 'CITIZEN'),
DataElement(0x0008010c, 'UI', '1.1'),
DataElement(0x00200011, 'IS', 3)]
# Fails
# DataElement(0x00080301, 'US', 1200)]
out_str = ["ds.PatientName = # XXX Array of 7 bytes excluded",
"ds.CodingSchemeUID = '1.1'",
'ds.SeriesNumber = "3"']
# Fails
# "ds.PrivateGroupReference = 1200"]
assert code_dataelem(elem, exclude_size=4) == out
pydicom/tests/test_util.py:90:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
pydicom/util/codify.py:111: in code_dataelem
valuerep = repr(dataelem.value)
pydicom/valuerep.py:507: in __repr__
return "\"" + int.__str__(self) + "\""
pydicom/valuerep.py:507: in __repr__
return "\"" + int.__str__(self) + "\""
E RecursionError: maximum recursion depth exceeded while calling a Python object
!!! Recursion detected (same locals & position)
=============================== warnings summary ===============================
pydicom/tests/test_dataset.py:1134

/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_pydicom/build/pydicom/tests/test_dataset.py:1134:
SyntaxWarning: "is" with a literal. Did you mean "=="?
if elem.keyword is 'PatientID':

-- Docs: https://docs.pytest.org/en/latest/warnings.html
== 6 failed, 1053 passed, 125 skipped, 6 xpassed, 1 warnings in 9.42 seconds ===
E: pybuild pybuild:342: test: plugin distutils failed with: exit code=1: cd
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_pydicom/build; python3.8 -m pytest
dh_auto_test: pybuild --test --test-pytest -i python{version} -p "3.8 3.7"
returned exit code 13
make: *** [debian/rules:12: build] Error 255
Matthias Klose
2020-01-14 12:20:01 UTC
Reply
Permalink
same failures in new upstream 1.3.0

Loading...