Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"No constructor found for MrkvArray" #1520

Open
iworld1991 opened this issue Jan 21, 2025 · 1 comment
Open

"No constructor found for MrkvArray" #1520

iworld1991 opened this issue Jan 21, 2025 · 1 comment

Comments

@iworld1991
Copy link
Contributor

Describe the bug
I initizlied a MarkovType based on the most recent release econ-ark 0.15.0 in a freshly created environment. The code is copied as below

hark_mkv = MarkovConsumerType(**hark_mkv_para)

I got the following errors.

ValueError Traceback (most recent call last)
Cell In[11], line 1
----> 1 hark_mkv = MarkovConsumerType(**hark_mkv_para)
2 hark_mkv.cycles = 0
3 hark_mkv.vFuncBool = False

File c:\ProgramData\mambaforge\envs\econ-ark3\Lib\site-packages\HARK\ConsumptionSaving\ConsMarkovModel.py:750, in MarkovConsumerType.init(self, **kwds)
747 params = init_indshk_markov.copy()
748 params.update(kwds)
--> 750 super().init(**params)
751 self.solve_one_period = solve_one_period_ConsMarkov
753 if not hasattr(self, "global_markov"):

File c:\ProgramData\mambaforge\envs\econ-ark3\Lib\site-packages\HARK\ConsumptionSaving\ConsIndShockModel.py:1914, in IndShockConsumerType.init(self, verbose, quiet, **kwds)
1912 # Add consumer-type specific objects, copying to create independent versions
1913 self.solve_one_period = solve_one_period_ConsIndShock
-> 1914 self.update()

File c:\ProgramData\mambaforge\envs\econ-ark3\Lib\site-packages\HARK\ConsumptionSaving\ConsMarkovModel.py:769, in MarkovConsumerType.update(self)
756 def update(self):
757 """
758 Update the Markov array, the income process, the assets grid, and
759 the terminal solution.
(...)
767 None
768 """
--> 769 self.construct("MrkvArray")
770 super().update()

File c:\ProgramData\mambaforge\envs\econ-ark3\Lib\site-packages\HARK\core.py:417, in Model.construct(self, force, *args)
415 continue
416 else:
--> 417 raise ValueError("No constructor found for " + key) from None
419 # Get the names of arguments for this constructor and try to gather them
420 args_needed = get_arg_names(constructor)

ValueError: No constructor found for MrkvArray

@mnwhite
Copy link
Contributor

mnwhite commented Jan 21, 2025

Version 0.15.0 is not the latest version; 0.15.1 is. And as far as I know, this problem (and another related one) was fixed in #1484 , which has been merged into master, but not put into a release yet. There are a few small PRs that we want to get merged before putting out a new release.

Can you test this with the current version of HARK in the repo?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants