You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I created a plan and when I try to run the sync_plans() command, it gives me a KeyError exception.
PINAX_STRIPE_API_VERSION = '2018-05-21'
Steps to Reproduce
Create a plan directly into Stripe
Run sync_plans() command
What were you expecting to happen?
All plans are synced
What actually happened?
An error occured:
Traceback (most recent call last):
File "manage.py", line 22, in <module>
execute_from_command_line(sys.argv)
File "/home/frujo/projects/venvs/potweedquebec/lib/python3.5/site-packages/django/core/management/__init__.py", line 371, in execute_from_command_line
utility.execute()
File "/home/frujo/projects/venvs/potweedquebec/lib/python3.5/site-packages/django/core/management/__init__.py", line 365, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/frujo/projects/venvs/potweedquebec/lib/python3.5/site-packages/django/core/management/base.py", line 288, in run_from_argv
self.execute(*args, **cmd_options)
File "/home/frujo/projects/venvs/potweedquebec/lib/python3.5/site-packages/django/core/management/base.py", line 335, in execute
output = self.handle(*args, **options)
File "/home/frujo/projects/venvs/potweedquebec/lib/python3.5/site-packages/pinax/stripe/management/commands/sync_plans.py", line 11, in handle
plans.sync_plans()
File "/home/frujo/projects/venvs/potweedquebec/lib/python3.5/site-packages/pinax/stripe/actions/plans.py", line 18, in sync_plans
sync_plan(plan)
File "/home/frujo/projects/venvs/potweedquebec/lib/python3.5/site-packages/pinax/stripe/actions/plans.py", line 35, in sync_plan
"name": plan["name"],
File "/home/frujo/projects/venvs/potweedquebec/lib/python3.5/site-packages/stripe/stripe_object.py", line 122, in __getitem__
raise err
File "/home/frujo/projects/venvs/potweedquebec/lib/python3.5/site-packages/stripe/stripe_object.py", line 111, in __getitem__
return super(StripeObject, self).__getitem__(k)
KeyError: 'name'
@jibusayone In Stripe version 2018-05-21 the field name has been renamed to nickname on the plan object. You will have to update actions/plans.py (sync_plans) and models/Plan (name)
Issue Summary
I created a plan and when I try to run the sync_plans() command, it gives me a KeyError exception.
Steps to Reproduce
What were you expecting to happen?
All plans are synced
What actually happened?
An error occured:
Here is the content of plan object:
The text was updated successfully, but these errors were encountered: