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

Image.__repr__ raises AttributeError when Image is constructed with no arguments #183

Closed
att14 opened this issue Jul 28, 2014 · 3 comments
Closed
Labels

Comments

@att14
Copy link
Contributor

att14 commented Jul 28, 2014

ipdb> Image()
*** TypeError: 'NoneType' object has no attribute '__getitem__'

The offending statement is self.signiture[:7].

Either Image should not be allowed to take 0 arguments or __repr__ should handle this correctly.

@att14 att14 changed the title Image.__repr__ raises Attribute error when Image is constructed with no arguments Image.__repr__ raises AttributeError when Image is constructed with no arguments Jul 28, 2014
@dahlia
Copy link
Collaborator

dahlia commented Jul 29, 2014

Strange. I think the constructor should raise TypeError when there are no given arguments.

@dahlia dahlia added the bug label Aug 2, 2014
@emcconville
Copy link
Owner

Is this still an issue? I have a feeling this was addressed in a previous release.

>>> i = Image()
>>> repr(i)
'<wand.image.Image: (empty)>'
>>> Image()
<wand.image.Image: (empty)>

@emcconville
Copy link
Owner

Yep. Fixed with #265 with 2edc311. Closing.

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

3 participants