Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX THIS DAMN REGION PROPS BUG #57

Open
hughesadam87 opened this issue Apr 27, 2014 · 3 comments
Open

FIX THIS DAMN REGION PROPS BUG #57

hughesadam87 opened this issue Apr 27, 2014 · 3 comments
Labels

Comments

@hughesadam87
Copy link
Owner

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.

@jimrybarski
Copy link

Could you paste your code?

@hughesadam87
Copy link
Owner Author

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?

@jimrybarski
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants