PolicyEngine / policyengine-taxsim

TAXSIM emulator using the PolicyEngine US federal and state tax calculator
0 stars 6 forks source link

Are you sure you spelled 'self_employment_income_last_year' correctly? #8

Open feenberg opened 3 weeks ago

feenberg commented 3 weeks ago

I just cloned policyengine-taxsim today and tried it out. Running the sample data I receive this error message:

raise SituationParsingError(path_in_json, str(e), code=404) policyengine_core.errors.situation_parsing_error.SituationParsingError: {'people': {'you': {'self_employment_income_last_year': "You tried to calculate or to set a value for variable 'self_employment_income_last_year', but it was not found in the loaded tax and benefit system (CountryTaxBenefitSystem). Are you sure you spelled 'self_employment_income_last_year' correctly? If this code used to work and suddenly does not, this is most probably linked to an update of the tax and benefit system. Look at its changelog to learn about renames and removals and update your code. If it is an official package, it is probably available on https://github.com/openfisca/CountryTaxBenefitSystem/blob/master/CHANGELOG.md."}}}

If I remove all the data items from psemp on, then the error message complains about idtl.

If I then add idtl with value 2, I get the message

ValueError: Variable hi_income_tax does not exist.

I notice that policyengine-taxsim accepts empty fields as zero. This is a good practice and I will add it to Taxsim.

MaxGhenis commented 3 weeks ago

Thanks - we should change these lines:

https://github.com/PolicyEngine/policyengine-taxsim/blob/682195e3e36328b431896e96f0dbf9145b7945e8/TaxsimInputReader.py#L83-L84

For the hi_income_tax piece, we do have hi_income_tax in policyengine-us. Could you try updating? pip install -U policyengine-us

feenberg commented 3 weeks ago

I ran the pip install and got

TypeError: init() got an unexpected keyword argument 'reform'

Does the emulator try to call taxsim? You should consult me about that, because I can make taxsim into a DLL for you. I did it once before, shouldn't be too hard. But I didn't expect you to be calling taxsim so soon, I thought to start out with the program would just do your calculator.

Daniel Feenberg

On Sun, 22 Sep 2024, Max Ghenis wrote:

Thanks - we should change these lines:

https://github.com/PolicyEngine/policyengine-taxsim/blob/682195e3e36328b431896e96f0dbf9145b7945e8/TaxsimInputReader.py#L83-L84

For the hi_income_tax piece, we do have hi_income_tax in policyengine-us. Could you try updating? pip install -U policyengine-us

-- Reply to this email directly or view it on GitHub: https://github.com/PolicyEngine/policyengine-taxsim/issues/8#issuecomment-2366860155 You are receiving this because you authored the thread.

Message ID: @.***>

MaxGhenis commented 3 weeks ago

No I don't think it calls taxsim.

MaxGhenis commented 3 weeks ago

We checked in this morning and it seemed that this could be due to Python 3.9, which PolicyEngine no longer support. @feenberg will report back after updating to 3.10, which might be a couple weeks as it's a server.