Opened 7 years ago

Closed 7 years ago

#1801 closed defect (fixed)

error reading DICOM RTDOSE: tuple object not callable

Reported by: Elaine Meng Owned by: Tom Goddard
Priority: major Milestone:
Component: Volume Data Version:
Keywords: Cc:
Blocked By: Blocking:
Notify when closed: Platform: all
Project: ChimeraX

Description

for example, any of the RT DOSE subdirs in the same dataset as attached to ticket #1662 (the RTSTRUCT models, however, are still read OK)

UCSF ChimeraX version: 0.9 (2019-03-25)
© 2016-2019 Regents of the University of California. All rights reserved.
How to cite UCSF ChimeraX
open "/Users/meng/Desktop/02-20-2000-522-26564/4-RT Dose - fx1hetero-4.5.1" format dicomTraceback (most recent call last):

File "/Users/chimera/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/chimerax/ui/gui.py", line 808, in <lambda>

open_folder_action.triggered.connect(lambda arg, s=self, sess=session: s.folder_open_cb(sess))

File "/Users/chimera/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/chimerax/ui/gui.py", line 573, in folder_open_cb

self._open_folder.display(session)

File "/Users/chimera/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/chimerax/ui/open_folder.py", line 62, in display

run(session, cmd)

File "/Users/chimera/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/chimerax/core/commands/run.py", line 31, in run

results = command.run(text, log=log)

File "/Users/chimera/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/chimerax/core/commands/cli.py", line 2616, in run

result = ci.function(session, kw_args)

File "/Users/chimera/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/chimerax/core/commands/open.py", line 41, in open

from_database=from_database, ignore_cache=ignore_cache, kw))

File "/Users/chimera/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/chimerax/core/commands/open.py", line 117, in open

models = handle_unknown_kw(session.models.open, paths, format=format, name=name, kw)

File "/Users/chimera/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/chimerax/core/commands/open.py", line 62, in handle_unknown_kw

return f(*args, kw)

File "/Users/chimera/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/chimerax/core/models.py", line 598, in open

session, filenames, format=format, name=name, kw)

File "/Users/chimera/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/chimerax/core/io.py", line 463, in open_multiple_data

models, status = open_func(session, paths, mname, kw)

File "/Users/chimera/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/chimerax/dicom/dicom.py", line 39, in open_dicom

models, msg = dicom_volumes(session, image_series, kw)

File "/Users/chimera/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/chimerax/dicom/dicom.py", line 117, in dicom_volumes

gmodels, gmsg = open_grids(session, grid_group, gname, kw)

File "/Users/chimera/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/chimerax/map/volume.py", line 3241, in open_grids

v.initialize_thresholds()

File "/Users/chimera/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/chimerax/map/volume.py", line 520, in initialize_thresholds

s = self.matrix_value_statistics()

File "/Users/chimera/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/chimerax/map/volume.py", line 1629, in matrix_value_statistics

matrices = self.displayed_matrices(read_matrix)

File "/Users/chimera/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/chimerax/map/volume.py", line 1664, in displayed_matrices

matrices.append(self.matrix(read_matrix))

File "/Users/chimera/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/chimerax/map/volume.py", line 1179, in matrix

m = self.region_matrix(r, read_matrix)

File "/Users/chimera/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/chimerax/map/volume.py", line 1203, in region_matrix

m = d.matrix(origin, size, step, progress, from_cache_only)

File "/Users/chimera/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/chimerax/map/data/griddata.py", line 248, in matrix

m = self.read_matrix(ijk_origin, ijk_size, ijk_step, progress)

File "/Users/chimera/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/chimerax/map/data/griddata.py", line 267, in read_matrix

m = self._read_full_planes(ijk_origin, ijk_size, ijk_step, progress)

File "/Users/chimera/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/chimerax/map/data/griddata.py", line 296, in _read_full_planes

m2d= self.read_xy_plane(k)

File "/Users/chimera/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/chimerax/dicom/dicom_grid.py", line 118, in read_xy_plane

m = self.dicom_data.read_plane(k, self.time, c)

File "/Users/chimera/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/chimerax/dicom/dicom_format.py", line 536, in read_plane

klast = self.data_size()[2]-1

TypeError: 'tuple' object is not callable

TypeError: 'tuple' object is not callable

File "/Users/chimera/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/chimerax/dicom/dicom_format.py", line 536, in read_plane
klast = self.data_size()[2]-1

See log for complete Python traceback.

Traceback (most recent call last):

File "/Users/chimera/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/chimerax/core/triggerset.py", line 130, in invoke

return self._func(self._name, data)

File "/Users/chimera/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/chimerax/map/volume.py", line 3489, in _update_drawings

v.initialize_thresholds()

File "/Users/chimera/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/chimerax/map/volume.py", line 520, in initialize_thresholds

s = self.matrix_value_statistics()

File "/Users/chimera/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/chimerax/map/volume.py", line 1629, in matrix_value_statistics

matrices = self.displayed_matrices(read_matrix)

File "/Users/chimera/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/chimerax/map/volume.py", line 1664, in displayed_matrices

matrices.append(self.matrix(read_matrix))

File "/Users/chimera/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/chimerax/map/volume.py", line 1179, in matrix

m = self.region_matrix(r, read_matrix)

File "/Users/chimera/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/chimerax/map/volume.py", line 1203, in region_matrix

m = d.matrix(origin, size, step, progress, from_cache_only)

File "/Users/chimera/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/chimerax/map/data/griddata.py", line 248, in matrix

m = self.read_matrix(ijk_origin, ijk_size, ijk_step, progress)

File "/Users/chimera/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/chimerax/map/data/griddata.py", line 267, in read_matrix

m = self._read_full_planes(ijk_origin, ijk_size, ijk_step, progress)

File "/Users/chimera/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/chimerax/map/data/griddata.py", line 296, in _read_full_planes

m2d= self.read_xy_plane(k)

File "/Users/chimera/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/chimerax/dicom/dicom_grid.py", line 118, in read_xy_plane

m = self.dicom_data.read_plane(k, self.time, c)

File "/Users/chimera/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/chimerax/dicom/dicom_format.py", line 536, in read_plane

klast = self.data_size()[2]-1

TypeError: 'tuple' object is not callable

Error processing trigger "graphics update": 'tuple' object is not callable:
TypeError: 'tuple' object is not callable

File "/Users/chimera/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/chimerax/dicom/dicom_format.py", line 536, in read_plane
klast = self.data_size()[2]-1

See log for complete Python traceback.

Change History (3)

comment:1 by Elaine Meng, 7 years ago

In the 3/18 daily build I also got this, but haven't seen it in the 3/25 build:

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File "/Users/meng/Desktop/ChimeraX-mar18.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/chimerax/core/updateloop.py", line 128, in _redraw_timer_callback

if not self.draw_new_frame():

File "/Users/meng/Desktop/ChimeraX-mar18.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/chimerax/core/updateloop.py", line 64, in draw_new_frame

changed = view.check_for_drawing_change()

File "/Users/meng/Desktop/ChimeraX-mar18.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/chimerax/core/graphics/view.py", line 252, in check_for_drawing_change

trig.activate_trigger('graphics update', self)

File "/Users/meng/Desktop/ChimeraX-mar18.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/chimerax/core/triggerset.py", line 325, in activate_trigger

trigger.activate(data)

File "/Users/meng/Desktop/ChimeraX-mar18.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/chimerax/core/triggerset.py", line 190, in activate

ret = handler.invoke(data, self._remove_bad_handlers)

File "/Users/meng/Desktop/ChimeraX-mar18.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/chimerax/core/triggerset.py", line 132, in invoke

_report('%s "%s": %s' % (TRIGGER_ERROR, self._name, str(e)))

File "/Users/meng/Desktop/ChimeraX-mar18.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/chimerax/core/session.py", line 943, in <lambda>

logger.report_exception(preface=preface))

File "/Users/meng/Desktop/ChimeraX-mar18.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/chimerax/core/logger.py", line 421, in report_exception

elif probably_chimera1_session(exc_info):

File "/Users/meng/Desktop/ChimeraX-mar18.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/chimerax/core/logger.py", line 720, in probably_chimera1_session

etype, evalue, etraceback = exc_info

TypeError: cannot unpack non-iterable NoneType object

TypeError: cannot unpack non-iterable NoneType object

File "/Users/meng/Desktop/ChimeraX-mar18.app/Contents/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/chimerax/core/logger.py", line 720, in probably_chimera1_session
etype, evalue, etraceback = exc_info

See log for complete Python traceback.

comment:2 by Elaine Meng, 7 years ago

That second traceback occurs in the 3/18 build but not the 3/25 build for all three tickets #1799 #1800 #1801

comment:3 by Tom Goddard, 7 years ago

Resolution: fixed
Status: assignedclosed

Fixed.

Typo in new dicom plane reading code that only effect data sets where the dicom plane files are in decreasing z order.

Note: See TracTickets for help on using tickets.