Closed dengemann closed 10 years ago
What is the error?
@mluessi ah, right ;-)
---------------------------------------------------------------------------
IndexError Traceback (most recent call last)
<ipython-input-2-5f4987fe74b0> in <module>()
----> 1 test_viz.test_image()
/Users/dengemann/anaconda/lib/python2.7/site-packages/numpy/testing/decorators.pyc in skipper_func(*args, **kwargs)
144 raise nose.SkipTest(get_msg(f,msg))
145 else:
--> 146 return f(*args, **kwargs)
147
148 def skipper_gen(*args, **kwargs):
/Users/dengemann/github/PySurfer/surfer/tests/test_viz.py in test_image()
50 brain = Brain(subject_id, 'both', surf=surf, config_opts=small_brain)
51 brain.add_overlay(overlay_fname, hemi='lh', min=5, max=20, sign="pos")
---> 52 brain.save_imageset(tmp_name, ['med', 'lat'], 'jpg')
53
54 brain = Brain(*std_args, config_opts=small_brain)
/Users/dengemann/github/PySurfer/surfer/viz.pyc in save_imageset(self, prefix, views, filetype, colorbar, row, col)
1845 self.show_colorbar(row, col)
1846 else:
-> 1847 self.hide_colorbar(row, col)
1848 self.show_view(view, row=row, col=col)
1849 if prefix is not None:
/Users/dengemann/github/PySurfer/surfer/viz.pyc in hide_colorbar(self, row, col)
1656 Column index of which brain to use
1657 """
-> 1658 self._colorbar_visibility(False, row, col)
1659
1660 def close(self):
/Users/dengemann/github/PySurfer/surfer/viz.pyc in _colorbar_visibility(self, visible, row, col)
1630
1631 def _colorbar_visibility(self, visible, row, col):
-> 1632 for cb in self._get_colorbars(row, col):
1633 if cb is not None:
1634 cb.visible = visible
/Users/dengemann/github/PySurfer/surfer/viz.pyc in _get_colorbars(self, row, col)
1624 for bar in ["pos_bar", "neg_bar"]:
1625 try:
-> 1626 colorbars.append(getattr(obj[ind], bar))
1627 except AttributeError:
1628 pass
IndexError: list index out of range
Basically the colorbar indexing is screwed.
pushed a fix, can someone pull and try?
For some reason my machine locks up when running tests now :(
I'm trying a different tactic, getting Travis to run the tests. :) Hopefully it will be quick...
@Eric89GXL does your machine also lock on master? If not that would not be a good sign.
Yeah, it's been doing it for a while (but not during regular use), I haven't gotten around to tracking down the issue.
@dengemann if you can push an empty commit, Travis will run a test (so I don't have to) and I can merge.
@Eric89GXL rebased instead.
The code passed, but the style did not :)
@Eric89GXL I see, new advances in automated nitpicking ;-)
@dengemann is this ready to merge from your end? (Sorry for the very slow response. I see that Travis is happy.)
I forgot about the details ... go ahead if you are happy :-)
LGTM. @mwaskom okay for you?
:+1:
this is a start, the changes produce a failing test with the same error I encountered in a real-world application.