openfisca / openfisca-core

OpenFisca core engine. See other repositories for countries-specific code & data.
https://openfisca.org
GNU Affero General Public License v3.0
170 stars 75 forks source link

Improve set_input_dispath error message #1107

Open benjello opened 2 years ago

benjello commented 2 years ago

Hi there!

I really enjoy OpenFisca, but I recently encountered an issue.

Here is what I did:

I tried to initialize a Simulation using a TaxBenefitSystem with conflicting set_input and definition_periodattributes

Here is what I expected to happen:

Detect the error at the TaxBenefitSystem creation level or at least show an error message indicating the name of variable of concern and its definition_period.

Here is what actually happened:

I got this unclear error message

clearer error message then the one I got

'set_input_dispatch_by_period can be used only for yearly or monthly variables.'

Context

I identify more as a: