pyparty icon indicating copy to clipboard operation
pyparty copied to clipboard

FIX THIS DAMN REGION PROPS BUG

Open hughesadam87 opened this issue 10 years ago • 3 comments

Traceback (most recent call last): File "/home/adam/Desktop/pyparty/pyparty/logging_utils/logger.py", line 219, in _wraps return fcn(_args, *_kwargs) File "/home/adam/Desktop/pyparty/pyparty/scripts/objectmodeling/objecthunt.py", line 178, in run_main MPLOT('multihist', 'hist', 'multihistkwds', multidir) File "/home/adam/Desktop/pyparty/pyparty/scripts/objectmodeling/objecthunt.py", line 85, in wrapper func(_args, *_kwargs) File "/home/adam/Desktop/pyparty/pyparty/scripts/objectmodeling/objecthunt.py", line 150, in MPLOT mcpltfcn(**mcpltkwds) File "/home/adam/Desktop/pyparty/pyparty/multi.py", line 445, in hist attr_list = [getattr(c, attr) for c in self.canvii] File "/home/adam/Desktop/pyparty/pyparty/tools/canvas.py", line 971, in getattr return getattr(self._particles, attr) File "/home/adam/Desktop/pyparty/pyparty/tools/manager.py", line 413, in getattr out = tuple(getattr(p, attr) for p in self.plist) File "/home/adam/Desktop/pyparty/pyparty/tools/manager.py", line 413, in out = tuple(getattr(p, attr) for p in self.plist) File "/home/adam/Desktop/pyparty/pyparty/trait_types/metaparticle.py", line 61, in getattr return self.particle.ski_descriptor(attr) File "/home/adam/Desktop/pyparty/pyparty/shape_models/abstract_shape.py", line 119, in ski_descriptor self._ski_descriptor = regionprops(self.boxed(), cache=True)[0] File "/home/adam/Enthought/Canopy_32bit/User/lib/python2.7/site-packages/skimage/measure/_regionprops.py", line 494, in regionprops raise TypeError('Only 2-D images supported.') TypeError: Only 2-D images supported.

hughesadam87 avatar Apr 27 '14 21:04 hughesadam87

Could you paste your code?

jimrybarski avatar May 13 '14 04:05 jimrybarski

Hey,

The bug is on the pyparty end, not a scikit image bug or anything. Also, didn't realize anyone else was on this board. Are you using this library?

hughesadam87 avatar Jun 13 '14 14:06 hughesadam87

No, I'm not using the library. I just had the same error when using scikit-image and this issue page came up when I googled it.

FWIW the problem was that I was passing a color image to something that could only accept grayscale, if memory serves correctly.

jimrybarski avatar Jun 13 '14 19:06 jimrybarski