Closed thomasdouenne closed 7 years ago
@thomasdouenne : do you understand how you should change this ?
No I had a look but I don't see how to proceed, whether I should change the whole structure of the script or not. These are basically just parametric reforms
You should mimic the structure https://github.com/openfisca/openfisca-france/blob/master/openfisca_france/reforms/allocations_familiales_imposables.py but keep the old modify_legislation since we are not using the latest master version
@benjello Do you know how to solve this? Is there another way to write?
File "c:\users\t.douenne\github\openfisca-france-indirect-taxation\openfisca_france_indirect_taxation\reforms\rattrapage_diesel_bis.py", line 575, in apply self.modify_parameters(modifier_function = modify_parameters)
File "c:\users\t.douenne\github\openfisca-core\openfisca_core\reforms.py", line 41, in getattr return getattr(self.reference, attribute)
AttributeError: 'FranceIndirectTaxationTaxBenefitSystem' object has no attribute 'modify_parameters'
Thé function should ne modify_legislation for tour version
On jeu. 21 sept. 2017 10:00 thomasdouenne notifications@github.com wrote:
@benjello https://github.com/benjello Do you know how to solve this? Is there another way to write?
File "c:\users\t.douenne\github\openfisca-france-indirect-taxation\openfisca_france_indirect_taxation\reforms\rattrapage_diesel_bis.py", line 575, in apply self.modify_parameters(modifier_function = modify_parameters)
File "c:\users\t.douenne\github\openfisca-core\openfisca_core\reforms.py", line 41, in getattr return getattr(self.reference, attribute)
AttributeError: 'FranceIndirectTaxationTaxBenefitSystem' object has no attribute 'modify_parameters'
— You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/openfisca/openfisca-france-indirect-taxation/issues/157#issuecomment-331082293, or mute the thread https://github.com/notifications/unsubscribe-auth/ABHxdzrUcmHSQ7LtM30IxhyTODhU8_tOks5skheXgaJpZM4PTI3e .
-- Mahdi Ben Jelloul
Do you mean that I should just drop the last line of the code, that is:
self.modify_parameters(modifier_function = modify_parameters)
?
There must be something incorrect in my function "modify_parameters". When I delete the last line previously mentionned, I get:
ParameterNotFound: Legislation parameter "rattrapage_diesel" was not found at instant "2011-01-01" by variable "depenses_diesel_ajustees_rattrapage_diesel".
Use .modify_legislation_json() instead of modify_parameters
This is the error I get but I cannot determine what goes wrong
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 141974: ordinal not in range(128)
It is a unicode problem You need to have the following line at the top of your python files
# -*- coding: utf-8 -*-
And maybe a little "u" in front of your strings
my_string_with_accents = u"L'été a été pluvieux"
I have both, but still I face this error with the tree modify_legislation_json.
@thomasdouenne since Openfisca-Core v17, the way reforms are defined is changed, see https://github.com/openfisca/openfisca-core/blob/master/CHANGELOG.md#1700---552
@michelbl : @thomasdouenne is not on v17 yet. We go step by step ;-)
Solved
Old reforms for energies do not work anymore. We need to adapt them. It includes: