We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
AttributeError: address_zip on strip object 
https://sentry.prod.mozaws.net/operations/mdn-prod/issues/7356686/

```
Resolver404: {'tried': [[<RegexURLPattern None ^media/(?:redesign/)?css/(?P<doc>.*)-min.css$>], [<RegexURLPattern None ^media/(?:redesign/)?js/(?P<doc>.*)-min.js$>], [<RegexURLPattern None ^media/(?:redesign/)?img(?P<suffix>.*)$>], [<RegexURLPattern None ^media/(?:redesign/)?css(?P<suffix>.*)$>], [<RegexURLPattern None ^media/(?:redesign/)?js(?P<suffix>.*)$>], [<RegexURLPattern None ^media/(?:redesign/)?fonts(?P<suffix>.*)$>], [<RegexURLPattern None ^media/uploads/demos/(?:.*)$>], [<RegexURLPattern None (?i)^(?P<one>.*)//(?P<two>.*)//(?P<three>.*)$>], [<RegexURLPattern None (?i)^(?P<one>.*)//(?P<two>.*)$>], [<RegexURLPattern None (?i)^samples/canvas-tutorial/2_1_canvas_rect.html$>], [<RegexURLPattern None (?i)^samples/canvas-tutorial/2_2_canvas_moveto.html$>], [<RegexURLPattern None (?i)^samples/canvas-tutorial/2_3_canvas_lineto.html$>], [<RegexURLPattern None (?i)^samples/canvas-tutorial/2_4_canvas_arc.html$>], [<RegexURLPattern None (?i)^samples/canvas-tutorial/2_5_canvas_quadraticcurveto.html$>], [<RegexURLPattern None (?i)^samples/canvas-tutorial/2_6_canvas_beziercurveto.html$>], [<RegexURLPattern None (?i)^samples/canvas-tutorial/3_1_canvas_drawimage.html$>], [<RegexURLPattern None (?i)^samples/canvas-tutorial/3_2_canvas_drawimage.html$>], [<RegexURLPattern None (?i)^samples/canvas-tutorial/3_3_canvas_drawimage.html$>], [<RegexURLPattern None (?i)^samples/canvas-tutorial/3_4_canvas_gallery.html$>], [<RegexURLPattern None (?i)^samples/canvas-tutorial/4_1_canvas_fillstyle.html$>], [<RegexURLPattern None (?i)^samples/canvas-tutorial/4_2_canvas_strokestyle.html$>], [<RegexURLPattern None (?i)^samples/canvas-tutorial/4_3_canvas_globalalpha.html$>], [<RegexURLPattern None (?i)^samples/canvas-tutorial/4_4_canvas_rgba.html$>], [<RegexURLPattern None (?i)^samples/canvas-tutorial/4_5_canvas_linewidth.html$>], [<RegexURLPattern None (?i)^samples/canvas-tutorial/4_6_canvas_linecap.html$>], [<RegexURLPattern None (?i)^samples/canvas-tutorial/4_7_canvas_linejoin.html$>], [<RegexURLPattern None (?i)^samples/canvas-tutorial/4_8_canvas_miterlimit.html$>], [<RegexURLPattern None (?i)^samples/canvas-tutorial/4_9_canvas_lineargradient.html$>], [<RegexURLPattern None (?i)^samples/canvas-tutorial/4_10_canvas_radialgradient.html$>], [<RegexURLPattern None (?i)^samples/canvas-tutorial/4_11_canvas_createpattern.html$>], [<RegexURLPattern None (?i)^samples/canvas-tutorial/5_1_canvas_savestate.html$>], [<RegexURLPattern None (?i)^samples/canvas-tutorial/5_2_canvas_translate.html$>], [<RegexURLPattern None (?i)^samples/canvas-tutorial/5_3_canvas_rotate.html$>], [<RegexURLPattern None (?i)^samples/canvas-tutorial/5_4_canvas_scale.html$>], [<RegexURLPattern None (?i)^samples/canvas-tutorial/6_1_canvas_composite.html$>], [<RegexURLPattern None (?i)^samples/canvas-tutorial/6_2_canvas_clipping.html$>], [<RegexURLPattern None (?i)^samples/canvas-tutorial/globalCompositeOperation.html$>], [<RegexURLPattern None (?i)^samples/canvas-tutorial/images/backdrop.png$>], [<RegexURLPattern None (?i)^samples/canvas-tutorial/images/bg_gallery.png$>], [<RegexURLPattern None (?i)^samples/canvas-tutorial/images/gallery_1.jpg$>], [<RegexURLPattern None (?i)^samples/canvas-tutorial/images/gallery_2.jpg$>], [<RegexURLPattern None (?i)^samples/canvas-tutorial/images/gallery_3.jpg$>], [<RegexURLPattern None (?i)^samples/canvas-tutorial/images/gallery_4.jpg$>], [<RegexURLPattern None (?i)^samples/canvas-tutorial/images/gallery_5.jpg$>], [<RegexURLPattern None (?i)^samples/canvas-tutorial/images/gallery_6.jpg$>], [<RegexURLPattern None (?i)^samples/canvas-tutorial/images/gallery_7.jpg$>], [<RegexURLPattern None (?i)^samples/canvas-tutorial/images/gallery_8.jpg$>], [<RegexURLPattern None (?i)^samples/canvas-tutorial/images/picture_frame.png$>], [<RegexURLPattern None (?i)^samples/canvas-tutorial/images/rhino.jpg$>], [<RegexURLPattern None (?i)^samples/canvas-tutorial/images/wallpaper.png$>], [<RegexURLPattern None (?i)^samples/domref/mozGetAsFile.html$>], [<RegexURLPattern None (?i)^samples/raycaster/input.js$>], [<RegexURLPattern None (?i)^samples/raycaster/Level.js$>], [<RegexURL...
  File "redirect_urls/middleware.py", line 14, in __call__
    resolver_match = self.resolver.resolve(request.path_info)
  File "newrelic/hooks/framework_django.py", line 600, in wrapper
    return _wrapped(*args, **kwargs)
  File "newrelic/hooks/framework_django.py", line 588, in _wrapped
    result = wrapped(path)
  File "newrelic/hooks/framework_django.py", line 575, in wrapper
    return wrapped(*args, **kwargs)
  File "django/urls/resolvers.py", line 394, in resolve
    raise Resolver404({'tried': tried, 'path': new_path})

KeyError: 'address_zip'
  File "stripe/stripe_object.py", line 90, in __getattr__
    return self[k]
  File "stripe/stripe_object.py", line 131, in __getitem__
    raise err
  File "stripe/stripe_object.py", line 119, in __getitem__
    return super(StripeObject, self).__getitem__(k)

AttributeError: address_zip
(4 additional frame(s) were not displayed)
...
  File "django/views/decorators/cache.py", line 57, in _wrapped_view_func
    response = view_func(request, *args, **kwargs)
  File "kuma/core/decorators.py", line 210, in wrapped
    return func(request, *args, **kwargs)
  File "kuma/users/views.py", line 476, in user_edit
    "subscription_info": retrieve_stripe_subscription_info(edit_user,),
  File "kuma/users/utils.py", line 65, in retrieve_stripe_subscription_info
    "zip": card.address_zip,
  File "stripe/stripe_object.py", line 92, in __getattr__
    raise AttributeError(*err.args)

AttributeError: address_zip
```

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `kuma/users/utils.py`
Content:
```
1 from datetime import datetime
2 
3 import stripe
4 from django.conf import settings
5 
6 
7 def retrieve_stripe_subscription(customer):
8     for subscription in customer.subscriptions.list().auto_paging_iter():
9         # We have to use array indexing syntax, as stripe uses dicts to
10         # represent its objects (dicts come with an .items method)
11         for item in subscription["items"].auto_paging_iter():
12             if item.plan.id == settings.STRIPE_PLAN_ID:
13                 return subscription
14 
15     return None
16 
17 
18 def create_stripe_customer_and_subscription_for_user(user, email, stripe_token):
19     customer = (
20         stripe.Customer.retrieve(user.stripe_customer_id)
21         if user.stripe_customer_id
22         else None
23     )
24     if not customer or customer.email != email:
25         customer = stripe.Customer.create(email=email, source=stripe_token,)
26         user.stripe_customer_id = customer.id
27         user.save()
28 
29     if retrieve_stripe_subscription(customer) is None:
30         stripe.Subscription.create(
31             customer=customer.id, items=[{"plan": settings.STRIPE_PLAN_ID}],
32         )
33 
34 
35 def retrieve_stripe_subscription_info(user):
36     stripe_customer = (
37         stripe.Customer.retrieve(user.stripe_customer_id, expand=["default_source"],)
38         if settings.STRIPE_PLAN_ID and user.stripe_customer_id
39         else None
40     )
41 
42     stripe_subscription = (
43         retrieve_stripe_subscription(stripe_customer)
44         if stripe_customer and stripe_customer.email == user.email
45         else None
46     )
47     if stripe_subscription:
48         source = stripe_customer.default_source
49         if source.object == "card":
50             card = source
51         elif source.object == "source":
52             card = source.card
53         else:
54             raise ValueError(
55                 f"unexpected stripe customer default_source of type {source.object!r}"
56             )
57 
58         return {
59             "next_payment_at": datetime.fromtimestamp(
60                 stripe_subscription.current_period_end
61             ),
62             "brand": card.brand,
63             "expires_at": f"{card.exp_month}/{card.exp_year}",
64             "last4": card.last4,
65             "zip": card.address_zip,
66         }
67 
68     return None
69
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/kuma/users/utils.py b/kuma/users/utils.py
--- a/kuma/users/utils.py
+++ b/kuma/users/utils.py
@@ -62,7 +62,8 @@
             "brand": card.brand,
             "expires_at": f"{card.exp_month}/{card.exp_year}",
             "last4": card.last4,
-            "zip": card.address_zip,
+            # Cards that are part of a "source" don't have a zip
+            "zip": card.get("address_zip", None),
         }
 
     return None

{"golden_diff": "diff --git a/kuma/users/utils.py b/kuma/users/utils.py\n--- a/kuma/users/utils.py\n+++ b/kuma/users/utils.py\n@@ -62,7 +62,8 @@\n             \"brand\": card.brand,\n             \"expires_at\": f\"{card.exp_month}/{card.exp_year}\",\n             \"last4\": card.last4,\n-            \"zip\": card.address_zip,\n+            # Cards that are part of a \"source\" don't have a zip\n+            \"zip\": card.get(\"address_zip\", None),\n         }\n \n     return None\n", "issue": "AttributeError: address_zip on strip object \nhttps://sentry.prod.mozaws.net/operations/mdn-prod/issues/7356686/\n\n```\nResolver404: {'tried': [[<RegexURLPattern None ^media/(?:redesign/)?css/(?P<doc>.*)-min.css$>], [<RegexURLPattern None ^media/(?:redesign/)?js/(?P<doc>.*)-min.js$>], [<RegexURLPattern None ^media/(?:redesign/)?img(?P<suffix>.*)$>], [<RegexURLPattern None ^media/(?:redesign/)?css(?P<suffix>.*)$>], [<RegexURLPattern None ^media/(?:redesign/)?js(?P<suffix>.*)$>], [<RegexURLPattern None ^media/(?:redesign/)?fonts(?P<suffix>.*)$>], [<RegexURLPattern None ^media/uploads/demos/(?:.*)$>], [<RegexURLPattern None (?i)^(?P<one>.*)//(?P<two>.*)//(?P<three>.*)$>], [<RegexURLPattern None (?i)^(?P<one>.*)//(?P<two>.*)$>], [<RegexURLPattern None (?i)^samples/canvas-tutorial/2_1_canvas_rect.html$>], [<RegexURLPattern None (?i)^samples/canvas-tutorial/2_2_canvas_moveto.html$>], [<RegexURLPattern None (?i)^samples/canvas-tutorial/2_3_canvas_lineto.html$>], [<RegexURLPattern None (?i)^samples/canvas-tutorial/2_4_canvas_arc.html$>], [<RegexURLPattern None (?i)^samples/canvas-tutorial/2_5_canvas_quadraticcurveto.html$>], [<RegexURLPattern None (?i)^samples/canvas-tutorial/2_6_canvas_beziercurveto.html$>], [<RegexURLPattern None (?i)^samples/canvas-tutorial/3_1_canvas_drawimage.html$>], [<RegexURLPattern None (?i)^samples/canvas-tutorial/3_2_canvas_drawimage.html$>], [<RegexURLPattern None (?i)^samples/canvas-tutorial/3_3_canvas_drawimage.html$>], [<RegexURLPattern None (?i)^samples/canvas-tutorial/3_4_canvas_gallery.html$>], [<RegexURLPattern None (?i)^samples/canvas-tutorial/4_1_canvas_fillstyle.html$>], [<RegexURLPattern None (?i)^samples/canvas-tutorial/4_2_canvas_strokestyle.html$>], [<RegexURLPattern None (?i)^samples/canvas-tutorial/4_3_canvas_globalalpha.html$>], [<RegexURLPattern None (?i)^samples/canvas-tutorial/4_4_canvas_rgba.html$>], [<RegexURLPattern None (?i)^samples/canvas-tutorial/4_5_canvas_linewidth.html$>], [<RegexURLPattern None (?i)^samples/canvas-tutorial/4_6_canvas_linecap.html$>], [<RegexURLPattern None (?i)^samples/canvas-tutorial/4_7_canvas_linejoin.html$>], [<RegexURLPattern None (?i)^samples/canvas-tutorial/4_8_canvas_miterlimit.html$>], [<RegexURLPattern None (?i)^samples/canvas-tutorial/4_9_canvas_lineargradient.html$>], [<RegexURLPattern None (?i)^samples/canvas-tutorial/4_10_canvas_radialgradient.html$>], [<RegexURLPattern None (?i)^samples/canvas-tutorial/4_11_canvas_createpattern.html$>], [<RegexURLPattern None (?i)^samples/canvas-tutorial/5_1_canvas_savestate.html$>], [<RegexURLPattern None (?i)^samples/canvas-tutorial/5_2_canvas_translate.html$>], [<RegexURLPattern None (?i)^samples/canvas-tutorial/5_3_canvas_rotate.html$>], [<RegexURLPattern None (?i)^samples/canvas-tutorial/5_4_canvas_scale.html$>], [<RegexURLPattern None (?i)^samples/canvas-tutorial/6_1_canvas_composite.html$>], [<RegexURLPattern None (?i)^samples/canvas-tutorial/6_2_canvas_clipping.html$>], [<RegexURLPattern None (?i)^samples/canvas-tutorial/globalCompositeOperation.html$>], [<RegexURLPattern None (?i)^samples/canvas-tutorial/images/backdrop.png$>], [<RegexURLPattern None (?i)^samples/canvas-tutorial/images/bg_gallery.png$>], [<RegexURLPattern None (?i)^samples/canvas-tutorial/images/gallery_1.jpg$>], [<RegexURLPattern None (?i)^samples/canvas-tutorial/images/gallery_2.jpg$>], [<RegexURLPattern None (?i)^samples/canvas-tutorial/images/gallery_3.jpg$>], [<RegexURLPattern None (?i)^samples/canvas-tutorial/images/gallery_4.jpg$>], [<RegexURLPattern None (?i)^samples/canvas-tutorial/images/gallery_5.jpg$>], [<RegexURLPattern None (?i)^samples/canvas-tutorial/images/gallery_6.jpg$>], [<RegexURLPattern None (?i)^samples/canvas-tutorial/images/gallery_7.jpg$>], [<RegexURLPattern None (?i)^samples/canvas-tutorial/images/gallery_8.jpg$>], [<RegexURLPattern None (?i)^samples/canvas-tutorial/images/picture_frame.png$>], [<RegexURLPattern None (?i)^samples/canvas-tutorial/images/rhino.jpg$>], [<RegexURLPattern None (?i)^samples/canvas-tutorial/images/wallpaper.png$>], [<RegexURLPattern None (?i)^samples/domref/mozGetAsFile.html$>], [<RegexURLPattern None (?i)^samples/raycaster/input.js$>], [<RegexURLPattern None (?i)^samples/raycaster/Level.js$>], [<RegexURL...\n  File \"redirect_urls/middleware.py\", line 14, in __call__\n    resolver_match = self.resolver.resolve(request.path_info)\n  File \"newrelic/hooks/framework_django.py\", line 600, in wrapper\n    return _wrapped(*args, **kwargs)\n  File \"newrelic/hooks/framework_django.py\", line 588, in _wrapped\n    result = wrapped(path)\n  File \"newrelic/hooks/framework_django.py\", line 575, in wrapper\n    return wrapped(*args, **kwargs)\n  File \"django/urls/resolvers.py\", line 394, in resolve\n    raise Resolver404({'tried': tried, 'path': new_path})\n\nKeyError: 'address_zip'\n  File \"stripe/stripe_object.py\", line 90, in __getattr__\n    return self[k]\n  File \"stripe/stripe_object.py\", line 131, in __getitem__\n    raise err\n  File \"stripe/stripe_object.py\", line 119, in __getitem__\n    return super(StripeObject, self).__getitem__(k)\n\nAttributeError: address_zip\n(4 additional frame(s) were not displayed)\n...\n  File \"django/views/decorators/cache.py\", line 57, in _wrapped_view_func\n    response = view_func(request, *args, **kwargs)\n  File \"kuma/core/decorators.py\", line 210, in wrapped\n    return func(request, *args, **kwargs)\n  File \"kuma/users/views.py\", line 476, in user_edit\n    \"subscription_info\": retrieve_stripe_subscription_info(edit_user,),\n  File \"kuma/users/utils.py\", line 65, in retrieve_stripe_subscription_info\n    \"zip\": card.address_zip,\n  File \"stripe/stripe_object.py\", line 92, in __getattr__\n    raise AttributeError(*err.args)\n\nAttributeError: address_zip\n```\n", "before_files": [{"content": "from datetime import datetime\n\nimport stripe\nfrom django.conf import settings\n\n\ndef retrieve_stripe_subscription(customer):\n    for subscription in customer.subscriptions.list().auto_paging_iter():\n        # We have to use array indexing syntax, as stripe uses dicts to\n        # represent its objects (dicts come with an .items method)\n        for item in subscription[\"items\"].auto_paging_iter():\n            if item.plan.id == settings.STRIPE_PLAN_ID:\n                return subscription\n\n    return None\n\n\ndef create_stripe_customer_and_subscription_for_user(user, email, stripe_token):\n    customer = (\n        stripe.Customer.retrieve(user.stripe_customer_id)\n        if user.stripe_customer_id\n        else None\n    )\n    if not customer or customer.email != email:\n        customer = stripe.Customer.create(email=email, source=stripe_token,)\n        user.stripe_customer_id = customer.id\n        user.save()\n\n    if retrieve_stripe_subscription(customer) is None:\n        stripe.Subscription.create(\n            customer=customer.id, items=[{\"plan\": settings.STRIPE_PLAN_ID}],\n        )\n\n\ndef retrieve_stripe_subscription_info(user):\n    stripe_customer = (\n        stripe.Customer.retrieve(user.stripe_customer_id, expand=[\"default_source\"],)\n        if settings.STRIPE_PLAN_ID and user.stripe_customer_id\n        else None\n    )\n\n    stripe_subscription = (\n        retrieve_stripe_subscription(stripe_customer)\n        if stripe_customer and stripe_customer.email == user.email\n        else None\n    )\n    if stripe_subscription:\n        source = stripe_customer.default_source\n        if source.object == \"card\":\n            card = source\n        elif source.object == \"source\":\n            card = source.card\n        else:\n            raise ValueError(\n                f\"unexpected stripe customer default_source of type {source.object!r}\"\n            )\n\n        return {\n            \"next_payment_at\": datetime.fromtimestamp(\n                stripe_subscription.current_period_end\n            ),\n            \"brand\": card.brand,\n            \"expires_at\": f\"{card.exp_month}/{card.exp_year}\",\n            \"last4\": card.last4,\n            \"zip\": card.address_zip,\n        }\n\n    return None\n", "path": "kuma/users/utils.py"}], "after_files": [{"content": "from datetime import datetime\n\nimport stripe\nfrom django.conf import settings\n\n\ndef retrieve_stripe_subscription(customer):\n    for subscription in customer.subscriptions.list().auto_paging_iter():\n        # We have to use array indexing syntax, as stripe uses dicts to\n        # represent its objects (dicts come with an .items method)\n        for item in subscription[\"items\"].auto_paging_iter():\n            if item.plan.id == settings.STRIPE_PLAN_ID:\n                return subscription\n\n    return None\n\n\ndef create_stripe_customer_and_subscription_for_user(user, email, stripe_token):\n    customer = (\n        stripe.Customer.retrieve(user.stripe_customer_id)\n        if user.stripe_customer_id\n        else None\n    )\n    if not customer or customer.email != email:\n        customer = stripe.Customer.create(email=email, source=stripe_token,)\n        user.stripe_customer_id = customer.id\n        user.save()\n\n    if retrieve_stripe_subscription(customer) is None:\n        stripe.Subscription.create(\n            customer=customer.id, items=[{\"plan\": settings.STRIPE_PLAN_ID}],\n        )\n\n\ndef retrieve_stripe_subscription_info(user):\n    stripe_customer = (\n        stripe.Customer.retrieve(user.stripe_customer_id, expand=[\"default_source\"],)\n        if settings.STRIPE_PLAN_ID and user.stripe_customer_id\n        else None\n    )\n\n    stripe_subscription = (\n        retrieve_stripe_subscription(stripe_customer)\n        if stripe_customer and stripe_customer.email == user.email\n        else None\n    )\n    if stripe_subscription:\n        source = stripe_customer.default_source\n        if source.object == \"card\":\n            card = source\n        elif source.object == \"source\":\n            card = source.card\n        else:\n            raise ValueError(\n                f\"unexpected stripe customer default_source of type {source.object!r}\"\n            )\n\n        return {\n            \"next_payment_at\": datetime.fromtimestamp(\n                stripe_subscription.current_period_end\n            ),\n            \"brand\": card.brand,\n            \"expires_at\": f\"{card.exp_month}/{card.exp_year}\",\n            \"last4\": card.last4,\n            # Cards that are part of a \"source\" don't have a zip\n            \"zip\": card.get(\"address_zip\", None),\n        }\n\n    return None\n", "path": "kuma/users/utils.py"}]}