This error occurs because the internal id of the -Not Taxable- tax code is incorrect. There are two -Not Taxable- codes on the system: -Not Taxable- tax code (Internal Id = -7) and -Not Taxable- tax group (Internal Id = -8).
To resolve check the Tax Code Lists Include preference under Setup > Accounting > Set Up Taxes > United States:
If Tax Code Lists Include is set to Tax Codes Only, use Internal Id = -7.
If Tax Code Lists Include is set to Tax Groups Only, use Internal Id = -8.