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

StripeObject.__repr__ causes a TypeError in Python 3 #54

Closed
russelldavis opened this issue Dec 19, 2013 · 1 comment
Closed

StripeObject.__repr__ causes a TypeError in Python 3 #54

russelldavis opened this issue Dec 19, 2013 · 1 comment
Assignees

Comments

@russelldavis
Copy link

Reproduced as follows:

import stripe
stripe.api_key = "<your api key>"
print(repr(stripe.Charge.all()))

Resulting in:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.3/site-packages/stripe/resource.py", line 138, in __repr__
    ' '.join(ident_parts), hex(id(self)), str(self))
TypeError: sequence item 1: expected str instance, bytes found
@ghost ghost assigned metcalf Dec 19, 2013
@defrex
Copy link

defrex commented Feb 10, 2014

I can add that this bug has some negative side effects. Take stripe/resource.py line 275:

util.logger.debug("Trying to save already saved object %r", self)

This will throw a confusing TypeError instead of logging.

speedplane pushed a commit to speedplane/stripe-python that referenced this issue Jul 9, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants