See https://github.com/PolicyEngine/openfisca-us/issues/693, which shows that an openfisca-us IndividualSim deriv call fails when calculating the derivative of a variable defined at an entity absent from the sim. In that example, snap is at the SPM unit level, but the sim only has a person.
This gets into the broader issue we've discussed, that it would be nice if individuals in an IndividualSim were automatically combined to higher-level entities. I think that'd fix the case where only the sim only has a person. I'm not sure what would work in the household case.
In the meantime, a more informative error message would help.
See https://github.com/PolicyEngine/openfisca-us/issues/693, which shows that an openfisca-us IndividualSim
deriv
call fails when calculating the derivative of a variable defined at an entity absent from the sim. In that example,snap
is at the SPM unit level, but the sim only has a person.This gets into the broader issue we've discussed, that it would be nice if individuals in an IndividualSim were automatically combined to higher-level entities. I think that'd fix the case where only the sim only has a person. I'm not sure what would work in the household case.
In the meantime, a more informative error message would help.