question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Subscription Items Not Accessible

See original GitHub issue

We have code such as this:

 active_subs = stripe.Subscription.list(status="active", customer=stripe_customer_id)

 for sub in active_subs:
        items = sub.items
        for item in items:
          print(item)

However, this throws an exception on the for item in items line with a TypeError: 'builtin_function_or_method' object is not iterable

If you just print the active_subs response, you see that the fully populated items are returned in the response, and you can even read them the values from the PyCharm debugger.

We are on python 3.6, and stripe python 2.14.0

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
remi-stripecommented, Dec 6, 2018

@nZac Changing the name would not be possible since it maps to the API resource itself and is the same in all our libraries. We definitely should improve the docs though and I made a note of this!

0reactions
remi-stripecommented, Mar 9, 2022

@aegoff sorry for the trouble. That code is more supposed to be “pseudo-code” and not copy-pasted but it’s not clear that this isn’t valid Python as a Python dev, while if you are in the PHP tab you know this is “pseudo-code” and not real PHP. I’ll see how we can make this clearer though as I agree it’s confusing!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Stripe API reference – Subscription Items – curl
Subscription items allow you to create customer subscriptions with more than one ... Once specified as either inclusive or exclusive , it cannot...
Read more >
Manage Non-Subscription Items - Knowledge Center - Zuora
With the Unified Invoicing feature enabled, the Manage Non-Subscription Items setting is available on the Finance Settings page.
Read more >
Testing subscription in Android: item not found - Stack Overflow
Even I have been looking for this , and am guessing that you may have already solved your problem.But this might help others...
Read more >
PayPal is not visible in checkout for “Subscription” items
The disabling of the gateway for guest users when subscription products are in the cart is a deliberate & temporary measure to prevent...
Read more >
Apple One Family subscription not availab…
Our individual subscription items (Music, iCloud storage, etc) have expired/been cancelled so now they have no access to the services.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found