The Fix
pip install stripe==14.4.0a2
Based on closed stripe/stripe-python issue #854 · PR/commit linked
Production note: Most teams hit this during upgrades or environment changes. Roll out with a canary and smoke critical endpoints (health, OpenAPI/docs) before 100%.
@@ -174,8 +174,13 @@ def convert_to_stripe_object(
)
- if hasattr(obj, "object") and (
- (obj.object == "list") or (obj.object == "search_result")
+ # We only need to update _retrieve_params when special params were
Out[1]: <InvoiceLineItem line_item id=sli_196a32JWbpnZzq9u8b781cd6 at 0x7f51a4bf5450> JSON: {
"amount": 0,
"amount_excluding_tax": 0,
"currency": "usd",
....
}
Re-run the minimal reproduction on your broken version, then apply the fix and re-run.
Option A — Upgrade to fixed release\npip install stripe==14.4.0a2\nWhen NOT to use: Do not use this fix if the application relies on the previous behavior of returning None.\n\n
Why This Fix Works in Production
- Trigger: The auto_paging_iter() function call for Invoice.lines returns **TypeError: argument of type 'NoneType' is not iterable**
- Mechanism: The auto_paging_iter function failed due to a NoneType being returned instead of an iterable
- Why the fix works: Fixes the issue where auto_paging_iter failed on nested list objects, which caused a TypeError when retrieving invoice lines. (first fixed release: 14.4.0a2).
- If left unfixed, the same config can fail only in production (env differences), causing startup failures or partial feature outages.
Why This Breaks in Prod
- Shows up under Python 3.8 in real deployments (not just unit tests).
- The auto_paging_iter function failed due to a NoneType being returned instead of an iterable
- Production symptom (often without a traceback): The auto_paging_iter() function call for Invoice.lines returns **TypeError: argument of type 'NoneType' is not iterable**
Proof / Evidence
- GitHub issue: #854
- Fix PR: https://github.com/stripe/stripe-python/pull/855
- First fixed release: 14.4.0a2
- Reproduced locally: No (not executed)
- Last verified: 2026-02-08
- Confidence: 0.85
- Did this fix it?: Yes (upstream fix exists)
- Own content ratio: 0.68
Discussion
High-signal excerpts from the issue thread (symptoms, repros, edge-cases).
“Thanks again for the report @gogosofta and sorry about the trouble. This has been fixed and released in 4.0.2: https://github.com/stripe/stripe-python/releases/tag/v4.0.2”
“Hi @gogosofta , thank you for the report and sorry you're having problems! I can reproduce with v4.0.1 and can also confirm it doesn't occur…”
Failure Signature (Search String)
- The auto_paging_iter() function call for Invoice.lines returns **TypeError: argument of type 'NoneType' is not iterable**
- As of 4.0.0, the function call throws the error described above.
Copy-friendly signature
Failure Signature
-----------------
The auto_paging_iter() function call for Invoice.lines returns **TypeError: argument of type 'NoneType' is not iterable**
As of 4.0.0, the function call throws the error described above.
Error Message
Signature-only (no traceback captured)
Error Message
-------------
The auto_paging_iter() function call for Invoice.lines returns **TypeError: argument of type 'NoneType' is not iterable**
As of 4.0.0, the function call throws the error described above.
Minimal Reproduction
Out[1]: <InvoiceLineItem line_item id=sli_196a32JWbpnZzq9u8b781cd6 at 0x7f51a4bf5450> JSON: {
"amount": 0,
"amount_excluding_tax": 0,
"currency": "usd",
....
}
Environment
- Python: 3.8
What Broke
The application encountered a TypeError when trying to iterate over invoice lines, causing functionality to break.
Why It Broke
The auto_paging_iter function failed due to a NoneType being returned instead of an iterable
Fix Options (Details)
Option A — Upgrade to fixed release Safe default (recommended)
pip install stripe==14.4.0a2
Use when you can deploy the upstream fix. It is usually lower-risk than long-lived workarounds.
Fix reference: https://github.com/stripe/stripe-python/pull/855
First fixed release: 14.4.0a2
Last verified: 2026-02-08. Validate in your environment.
When NOT to Use This Fix
- Do not use this fix if the application relies on the previous behavior of returning None.
Verify Fix
Re-run the minimal reproduction on your broken version, then apply the fix and re-run.
Did This Fix Work in Your Case?
Quick signal helps us prioritize which fixes to verify and improve.
Prevention
- Capture the exact failing error string in logs and tests so you can reproduce via a minimal script.
- Pin production dependencies and upgrade only with a reproducible test that hits the failing path.
Version Compatibility Table
| Version | Status |
|---|---|
| 14.4.0a2 | Fixed |
Related Issues
No related fixes found.
Sources
We don’t republish the full GitHub discussion text. Use the links above for context.