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

PR #2454 prevents use of **kwargs in model initialization #2462

Closed
DrEntropy opened this issue Nov 6, 2024 · 3 comments · Fixed by #2463
Closed

PR #2454 prevents use of **kwargs in model initialization #2462

DrEntropy opened this issue Nov 6, 2024 · 3 comments · Fixed by #2463
Labels
bug Release notes label

Comments

@DrEntropy
Copy link

DrEntropy commented Nov 6, 2024

Describe the bug
My model .__init__() takes in **kwargs to allow additional optional model configuration. This worked fine with solara viz until #2454 added a check that all parameters are being passed in. Error:

  File "...\Lib\site-packages\mesa\visualization\solara_viz.py", line 342, in _check_model_params
    raise ValueError(f"Missing required model parameter: {name}")
ValueError: Missing required model parameter: kwargs

Expected behavior
It should ignore the kwargs special parameter.

To Reproduce
Use **kwargs in your model .__init__ will do the trick :)

@quaquel quaquel added the bug Release notes label label Nov 6, 2024
@quaquel
Copy link
Member

quaquel commented Nov 6, 2024

Thanks for reporting this. I can confirm the issue.

I also slightly edited your post for clarity (just some github markdown stuff).

quaquel added a commit to quaquel/mesa that referenced this issue Nov 6, 2024
@quaquel
Copy link
Member

quaquel commented Nov 6, 2024

I put in #2463, which should fix it.

@DrEntropy
Copy link
Author

Can confirm, for my project ;) Thanks!

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

Successfully merging a pull request may close this issue.

2 participants