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

AttributeError: module 'stripe.api_resources' has no attribute 'Mandate' #632

Closed
alanhamlett opened this issue Nov 30, 2019 · 1 comment
Closed

Comments

@alanhamlett
Copy link

Python: 3.6.7
Stripe-Python: 2.41.0
Stripe API: 2019-11-05

When calling stripe.Invoice.retrieve(invoice_id) this exception is raised:

Traceback (most recent call last):
  File "/app/venv/lib/python3.6/site-packages/flask/app.py", line 2446, in wsgi_app
    response = self.full_dispatch_request()
  File "/app/venv/lib/python3.6/site-packages/flask/app.py", line 1951, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/app/venv/lib/python3.6/site-packages/flask/app.py", line 1820, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/app/venv/lib/python3.6/site-packages/flask/_compat.py", line 39, in reraise
    raise value
  File "/app/venv/lib/python3.6/site-packages/flask/app.py", line 1949, in full_dispatch_request
    rv = self.dispatch_request()
  File "/app/venv/lib/python3.6/site-packages/flask/app.py", line 1935, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/app/website/webhooks/views.py", line 511, in stripe_hook
    invoice = stripe.Invoice.retrieve(invoice_id)
  File "/app/venv/lib/python3.6/site-packages/stripe/api_resources/abstract/api_resource.py", line 12, in retrieve
    instance.refresh()
  File "/app/venv/lib/python3.6/site-packages/stripe/api_resources/abstract/api_resource.py", line 16, in refresh
    self.refresh_from(self.request("get", self.instance_url()))
  File "/app/venv/lib/python3.6/site-packages/stripe/stripe_object.py", line 246, in request
    response, api_key, self.stripe_version, self.stripe_account
  File "/app/venv/lib/python3.6/site-packages/stripe/util.py", line 165, in convert_to_stripe_object
    klass = get_object_classes().get(
  File "/app/venv/lib/python3.6/site-packages/stripe/util.py", line 135, in get_object_classes
    from stripe.object_classes import OBJECT_CLASSES
  File "/app/venv/lib/python3.6/site-packages/stripe/object_classes.py", line 48, in <module>
    api_resources.Mandate.OBJECT_NAME: api_resources.Mandate,
AttributeError: module 'stripe.api_resources' has no attribute 'Mandate'
@alanhamlett
Copy link
Author

Might have been a machine that didn't get the stripe python update deploy.

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

1 participant