Hi,

I have some trouble reading batch_data.mat into Python.

running

**> python testBatchRunner.py /g/screening/tischer/data/CPClusterInOut hallo 100 yes 100**

gives the following complaints:

**/g/screening/tischer/software/lib/python2.6/site-packages/scipy/io/matlab/mio.py:84: FutureWarning: Using struct_as_record default value (False) This will change to True in future versions

return MatFile5Reader(byte_stream, **kwargs)

Traceback (most recent call last):

File “testBatchRunner.py”, line 20, in

batch_info = loadmat("%(datadir)s/Batch_data.mat"%(locals()))

File “/g/screening/tischer/software/lib/python2.6/site-packages/scipy/io/matlab/mio.py”, line 111, in loadmat

matfile_dict = MR.get_variables()

File “/g/screening/tischer/software/lib/python2.6/site-packages/scipy/io/matlab/miobase.py”, line 354, in get_variables

res = getter.get_array()

File “/g/screening/tischer/software/lib/python2.6/site-packages/scipy/io/matlab/miobase.py”, line 395, in get_array

arr = self.get_raw_array()

File “/g/screening/tischer/software/lib/python2.6/site-packages/scipy/io/matlab/mio5.py”, line 481, in get_raw_array

item.**dict**[name] = self.read_element()

File “/g/screening/tischer/software/lib/python2.6/site-packages/scipy/io/matlab/mio5.py”, line 348, in read_element

return self.array_reader.read_element(*args, **kwargs)

File “/g/screening/tischer/software/lib/python2.6/site-packages/scipy/io/matlab/mio5.py”, line 241, in read_element

return self.current_getter(byte_count).get_array()

File “/g/screening/tischer/software/lib/python2.6/site-packages/scipy/io/matlab/miobase.py”, line 395, in get_array

arr = self.get_raw_array()

File “/g/screening/tischer/software/lib/python2.6/site-packages/scipy/io/matlab/mio5.py”, line 481, in get_raw_array

item.**dict**[name] = self.read_element()

File “/g/screening/tischer/software/lib/python2.6/site-packages/scipy/io/matlab/mio5.py”, line 348, in read_element

return self.array_reader.read_element(*args, **kwargs)
File “/g/screening/tischer/software/lib/python2.6/site-packages/scipy/io/matlab/mio5.py”, line 241, in read_element
return self.current_getter(byte_count).get_array()
File “/g/screening/tischer/software/lib/python2.6/site-packages/scipy/io/matlab/miobase.py”, line 395, in get_array
arr = self.get_raw_array()
File “/g/screening/tischer/software/lib/python2.6/site-packages/scipy/io/matlab/mio5.py”, line 449, in get_raw_array
result* = self.get_item()

File “/g/screening/tischer/software/lib/python2.6/site-packages/scipy/io/matlab/mio5.py”, line 453, in get_item

return self.read_element()

File “/g/screening/tischer/software/lib/python2.6/site-packages/scipy/io/matlab/mio5.py”, line 348, in read_element

return self.array_reader.read_element(*args, *

*kwargs)*

File “/g/screening/tischer/software/lib/python2.6/site-packages/scipy/io/matlab/mio5.py”, line 241, in read_element

return self.current_getter(byte_count).get_array()

File “/g/screening/tischer/software/lib/python2.6/site-packages/scipy/io/matlab/miobase.py”, line 396, in get_array

return self.array_reader.processor_func(arr, self)

File “/g/screening/tischer/software/lib/python2.6/site-packages/scipy/io/matlab/miobase.py”, line 310, in func

arr = np.empty(n_dims, dtype=‘U%d’ % dims-1])

TypeError: data type not understood

File “/g/screening/tischer/software/lib/python2.6/site-packages/scipy/io/matlab/mio5.py”, line 241, in read_element

return self.current_getter(byte_count).get_array()

File “/g/screening/tischer/software/lib/python2.6/site-packages/scipy/io/matlab/miobase.py”, line 396, in get_array

return self.array_reader.processor_func(arr, self)

File “/g/screening/tischer/software/lib/python2.6/site-packages/scipy/io/matlab/miobase.py”, line 310, in func

arr = np.empty(n_dims, dtype=‘U%d’ % dims-1])

TypeError: data type not understood

i tried to attached my Batch_data.mat file (not sure whether it worked, because i can’t see it anywhere);

in case you manage to read it into Python, could you maybe please sent me the files in the scipy/io/mio folder that did the job?! i guess i could just replace my files with yours and it should be fine…

best,

Christian.**