Original ref is: http://stackoverflow.com/questions/36393896/gdcm-python-dicom-decompression
Basically the code generated is [1]. So one would need to s/list/tuple/g in the error message for clarity.
thx
[1]
SWIGINTERN PyObject _wrap_Orientation_GetType(PyObject SWIGUNUSEDPARM(self), PyObject args) {
PyObject resultobj = 0;
double *arg1 ;
double temp1[6] ;
PyObject * obj0 = 0 ;
gdcm::Orientation::OrientationType result;
if (!PyArg_ParseTuple(args,(char )"O:Orientation_GetType",&obj0)) SWIG_fail;
{
// temp1[6] becomes a local variable
int i;
if (PyTuple_Check(obj0) /|| PyList_Check(obj0)/) {
if (!PyArg_ParseTuple(obj0,"dddddd",temp1,temp1+1,temp1+2,temp1+3,temp1+4,temp1+5)) {
PyErr_SetString(PyExc_TypeError,"list must have 6 elements");
return NULL;
}
arg1 = &temp1[0];
} else {
PyErr_SetString(PyExc_TypeError,"expected a list.");
return NULL;
}
}
result = (gdcm::Orientation::OrientationType)gdcm::Orientation::GetType((double const ())arg1);
resultobj = SWIG_From_int(static_cast< int >(result));
return resultobj;
fail:
return NULL;
}
This is an old bug tracker for SWIG which is no longer actively monitored (I only saw your ticket by chance). Please use the github tracker instead.
But this isn't a bug in SWIG anyway - the
"expected a list."
message isn't present in the SWIG source code and never has been - looks like it comes from a custom typemap gdcm specifies:https://codesearch.debian.net/search?q=%22expected+a+list.%22+package%3A%5CQgdcm%5CE&literal=1