1
The problem was that some invoice_lines did not have a tax_id (because they were added before that was implemented) and the tax_amount field on the InvoiceLine is a property field that is calculated by the rate on the related Tax object. So the tax_amount on those lines wasn’t able to be computed as it tried to sum floats and None types.
Source:stackexchange.com