The Fix
pip install stripe==14.4.0a2
Based on closed stripe/stripe-python issue #1263 · 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%.
@@ -260,6 +260,26 @@ def convert_to_stripe_object(
+def convert_to_dict(obj):
+ """Converts a StripeObject back to a regular dict.
+
DeprecationWarning:
The stripe.util package is deprecated, please change your
imports to import from stripe directly.
From:
from stripe.util import convert_to_stripe_object
To:
from stripe import convert_to_stripe_object
from stripe.util import convert_to_dict
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: This fix is not applicable if the function is not needed in your implementation.\n\n
Why This Fix Works in Production
- Trigger: Missing `convert_to_dict` export
- Mechanism: Added the `convert_to_dict` method to convert StripeObject instances to regular dictionaries.
- Why the fix works: Added the `convert_to_dict` method to convert StripeObject instances to regular dictionaries. (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.12 in real deployments (not just unit tests).
- Production symptom (often without a traceback): Missing `convert_to_dict` export
Proof / Evidence
- GitHub issue: #1263
- Fix PR: https://github.com/stripe/stripe-python/pull/541
- 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.60
Discussion
High-signal excerpts from the issue thread (symptoms, repros, edge-cases).
“I'll close the issue. Please feel free to reopen if you find a use case that's not covered.”
“Hi @stianjensen, thank you for your report. Do you mind sharing your use case for convert_to_dict? The StripeObject base class already inherits from dict, so…”
“Ah, thanks for the clarification. I'll look into just getting rid of our use of that function call altogether, then!”
Failure Signature (Search String)
- Missing `convert_to_dict` export
- https://github.com/stripe/stripe-python/blob/master/CHANGELOG.md#2220---2019-03-14
Copy-friendly signature
Failure Signature
-----------------
Missing `convert_to_dict` export
https://github.com/stripe/stripe-python/blob/master/CHANGELOG.md#2220---2019-03-14
Error Message
Signature-only (no traceback captured)
Error Message
-------------
Missing `convert_to_dict` export
https://github.com/stripe/stripe-python/blob/master/CHANGELOG.md#2220---2019-03-14
Minimal Reproduction
DeprecationWarning:
The stripe.util package is deprecated, please change your
imports to import from stripe directly.
From:
from stripe.util import convert_to_stripe_object
To:
from stripe import convert_to_stripe_object
from stripe.util import convert_to_dict
Environment
- Python: 3.12
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/541
First fixed release: 14.4.0a2
Last verified: 2026-02-08. Validate in your environment.
When NOT to Use This Fix
- This fix is not applicable if the function is not needed in your implementation.
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.