# recurly python: account.billing_info raises AttributeError on new accounts

## The problem

With the recurly V2 python client (2.2.17, python 3.5), creating a new account and then reading account.billing_info raised AttributeError - even after re-fetching with Account.get('1'). The reporter was following the docs example for updating billing info. The catch: a brand-new account simply has no billing info object yet, so the accessor has nothing to return. The reporter's workaround was confirmed correct by a maintainer, who updated the docs example (it had shown the update flow for what is really a create case).

## The verified fix

Don't read billing_info off a new account - create one and attach it. The verified pattern: `account = Account.get('1')`, then `billing_info = BillingInfo()`, `billing_info.token_id = 'TOKEN_ID'`, `account.update_billing_info(billing_info)`. The maintainer confirmed this is the expected way to create (as opposed to update) billing info. So the docs example you copied was for the update case; for new accounts, construct the BillingInfo object yourself and pass it to update_billing_info. Source: https://github.com/recurly/recurly-client-python/issues/145