- Symptom
- TypeError: 'builtin_function_or_method' object is not iterablesub.items prints a bound method instead of a list object
- Cause
- Before v15 StripeObject subclassed dict, so the attribute name items resolved to dict.items and shadowed the API field.
- Fix
- Use bracket access for the field. On v15 and later sub.items returns the line items and key iteration moves to to_dict().
- Apply
for item in subscription["items"]["data"]: print(item["price"]["id"])- Affected
- stripe-python before 15.0.0; behavior changes in 15.0.0
- Sources
Last verified 2026-10-15 · Confirmed by 0 builders