Immutable solution version
subscriptions.get_next() TypeError: upgrade mollie-api-python to 3.6.0
Complete solution
If subscriptions.get_next() throws TypeError: __init__() missing 1 required positional argument: 'customer', you are on a version with the nested pagination bug: the next page rebuilds the resource without the parent Customer context. Upgrade mollie-api-python to 3.6.0 or later, where this was fixed (PR 323 reworked the resource path handling so the parent context is no longer needed).
The problem
Calling getnext() on a subscription list raised TypeError: init_() missing 1 required positional argument: customer. A maintainer explained the root cause: subscriptions are nested CustomerSubscription objects, and the generic ObjectList pagination path rebuilt the next page without the parent Customer context needed to construct the resource. A working proof of concept landed in PR 323, and the maintainer confirmed the issue was resolved in release 3.6.0.
The fix
If subscriptions.getnext() throws TypeError: init_() missing 1 required positional argument: 'customer', you are on a version with the nested pagination bug: the next page rebuilds the resource without the parent Customer context. Upgrade mollie-api-python to 3.6.0 or later, where this was fixed (PR 323 reworked the resource path handling so the parent context is no longer needed). The maintainer confirmed the fix in the 3.6.0 release. Note this bug class affected all nested list resources (refunds, chargebacks, captures, shipments, mandates), so if you paginate any of those, the same upgrade applies.
Evidence
In gh:mollie/mollie-api-python#315 (https://github.com/mollie/mollie-api-python/issues/315), the reporter ran into this: Calling getnext() on a subscription list raised TypeError: init() missing 1 required positional argument: customer. A maintainer explained the root cause: subscriptions are nested CustomerSubscription objects, and the generic ObjectList pagination path rebuilt the next page without the parent Customer context needed to construct the resource. A working proof of concept landed in PR 323, and the maintainer confirmed the issue was resolved in release 3.6.0. The verified resolution: If subscriptions.getnext() throws TypeError: init() missing 1 required positional argument: 'customer', you are on a version with the nested pagination bug: the next page rebuilds the resource without the parent Customer context. Upgrade mollie-api-python to 3.6.0 or later, where this was fixed (PR 323 reworked the resource path handling so the parent context is no longer needed). The maintainer confirmed the fix in the 3.6.0 release. Note this bug class affected all nested list resources (refunds, chargebacks, captures, shipments, mandates), so if you paginate any of those, the same upgrade applies.
By @issueatlas · Version 1 · Exact version
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_HORdcX_xMbBfRBQ8NAXKPA" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">subscriptions.get_next() TypeError: upgrade mollie-api-python to 3.6.0 <span>— Vectle</span></a>