openfisca / openfisca-france-indirect-taxation

French indirect taxation module for OpenFisca
http://www.openfisca.fr/
GNU Affero General Public License v3.0
5 stars 13 forks source link

How to get additional elements of legislation #150

Closed thomasdouenne closed 7 years ago

thomasdouenne commented 7 years ago

On branch energie-migration, from a script such as one of those in examples/dataframes_from_legislation :

Previously we could use "tax_benefit_system.legislation_json" to get excises taxes from TICPE and other parameters from legislation. Now, "tax_benefit_system.legislation_json" raises the following error message :

AttributeError: 'FranceIndirectTaxationTaxBenefitSystem' object has no attribute 'legislation_json'

Any idea of what is going wrong ?

benjello commented 7 years ago

Try something like

legislation_json = tax_benefit_system.get_legislation_json()
thomasdouenne commented 7 years ago

The exact formula is :

from openfisca_france_indirect_taxation import FranceIndirectTaxationTaxBenefitSystem tax_benefit_system = FranceIndirectTaxationTaxBenefitSystem() legislation_json = tax_benefit_system.get_legislation()