econ-ark / DistributionOfWealthMPC

The Distribution of Wealth and the Marginal Propensity to Consume
2 stars 8 forks source link

TypeError: multiple values for 'reap_var' with do_mid.py #12

Closed sbenthall closed 1 year ago

sbenthall commented 1 year ago

I get the following when running do_mid.py from the command line, on master.

$ ipython do_mid.py
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
File ~/projects/econ-ark/DistributionOfWealthMPC/do_mid.py:20
     18 exec(open('MainSpecPoint.py').read())
     19 os.chdir(path_to_models)
---> 20 exec(open('cstwMPC_MAIN.py').read())
     22 # Run beta-dist model
     23 os.chdir(path_to_options)

File <string>:698

File <string>:147, in __init__(self, **kwds)

File ~/projects/econ-ark/DistributionOfWealthMPC/dowmpc/lib/python3.8/site-packages/HARK/ConsumptionSaving/ConsAggShockModel.py:1912, in CobbDouglasEconomy.__init__(self, agents, tolerance, act_T, **kwds)
   1901 params["sow_vars"] = [
   1902     "MaggNow",
   1903     "AaggNow",
   (...)
   1908     "KtoLnow",
   1909 ]
   1910 params.update(kwds)
-> 1912 Market.__init__(
   1913     self,
   1914     agents=agents,
   1915     reap_vars=["aLvl", "pLvl"],
   1916     track_vars=["MaggNow", "AaggNow"],
   1917     dyn_vars=["AFunc"],
   1918     tolerance=tolerance,
   1919     act_T=act_T,
   1920     **params
   1921 )
   1922 self.update()
   1924 # Use previously hardcoded values for AFunc updating if not passed
   1925 # as part of initialization dictionary.  This is to prevent a last
   1926 # minute update to HARK before a release from having a breaking change.

TypeError: __init__() got multiple values for keyword argument 'reap_vars'

We rarely run do_mid.py. There are currently no automated tests for its results and running it is not part of the REMARK release procedure. So I'm not sure when this error was introduced.

But it looks like it has something to do with the HARK 0.13.0 update and the ConsAggShockModel