You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Make Superset compatible with marshmallow>=4.0.0 #33162
On a fresh install of superset, since marshmallow 4.0.0 released https://pypi.org/project/marshmallow/, superset fails to init due to an error validating parameters
It is possible to work around this by manually installing marshmallow at 3.26.1
pip3 install marshmallow==3.26.1
It looks like the version is being set in requirements/development.txt, so I'm unsure as to where the version update is occurring
Screenshots/recordings
No response
Superset version
master / latest-dev
Python version
3.9
Node version
16
Browser
Not applicable
Additional context
File "/home/ec2-user/.local/lib/python3.9/site-packages/superset/charts/schemas.py", line 621, in ChartDataProphetOptionsSchema
periods = fields.Integer(
File "/home/ec2-user/.local/lib/python3.9/site-packages/marshmallow/fields.py", line 977, in init
super().init(as_string=as_string, **kwargs)
File "/home/ec2-user/.local/lib/python3.9/site-packages/marshmallow/fields.py", line 924, in init
super().init(**kwargs)
TypeError: init() got an unexpected keyword argument 'min'
Checklist
I have searched Superset docs and Slack and didn't find a solution to my problem.
I have searched the GitHub issue tracker and didn't find a similar bug report.
I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.
Hello @MattBodey! I'm Dosu, a bot here to help you with bugs, answer your questions, and guide you on your journey to becoming a contributor. I'm ready to assist while you wait for a human maintainer. Let’s tackle this together!
The issue you're encountering is due to a compatibility problem between Superset and Marshmallow 4.0.0. Specifically, the fields.Integer class in Marshmallow 4.0.0 no longer supports the min keyword argument, which is causing the error during Superset's initialization.
To resolve this issue, you can downgrade Marshmallow to version 3.26.1, where the min keyword argument is still supported. You can do this by running the following command:
pip3 install marshmallow==3.26.1
This should allow Superset to initialize without errors. It seems that the version of Marshmallow is specified in requirements/development.txt, but there might be an override or update happening elsewhere in the setup process. You may want to check other configuration files or scripts that could be specifying a different version of Marshmallow.
Is there somewhere we need to pin the dependency? It looks like Superset already installs 3.26.1. I'm not sure about the details of the failure, but I know we also use marshmallow-sqlalchemy which doesn't seem to support marshmallow 4.0 yet if I'm understanding correctly.
we are running a little integration test suite against Apache Superset and CrateDB, in order to validate both work together well. Two days ago, CI apparently started tripping on it.
In the meantime we must force Marshmallow version. How? Depends on how you install superset.
I don't completely understand this, yet. Isn't it possible to just add a corresponding version pinning constraint to Superset's main dependencies to handle the situation well, until Superset will be compatible with Marshmallow 4?
Marshmallow is already pinned to the right version in development.txt, via marshmallow-sqlalchemy module requirements, but somehow v4.0.0 gets installed in the end.
If you install it via pip install superset, Kubernetes or download the docker image, you won't force Marshmallow version the same way. I'm not fluent in Docker, even less in Kubernetes, so I went the PyPi way to fix it.
Hi Colin, thanks for showing the right dependency pinning in development.txt. The same, even more important, should also be conducted for the runtime dependencies, right? Otherwise, it will leave the average user stranded like outlined in this thread.
We've been able to resolve several of the initialization issues (including the minLength issue) by migrating to newer 4.0 marshmallow conventions using this migration guide . They are mainly related to marshmallow Schemas using outdated pre-4.0 conventions. There's quite a few instances of these to fix so will get back once we've covered them all.
Additionally we might need to bump marshmallow-sqlalchemy to 1.5.0+ for better marshmallow 4.0 support, but willl confirm the first approach before resorting to this.
marshmallow maintainer here. just a heads up that we're planning to EOL marshmallow v3 on April 16. I only skimmed #35920 but the marshmallow API changes there looks correct. i didn't get a chance to thoroughly review the Flask-AppBuilder shim. looks like there may already be pending work in FAB to support marshmallow 4
#39751 took us to marshmallow 4.3.0 with the compatibility work to back it, so this is done - closing. Earlier PRs just pinned <4; this one's the real fix.
Activity
dosubot commentedon Apr 17, 2025
Hello @MattBodey! I'm Dosu, a bot here to help you with bugs, answer your questions, and guide you on your journey to becoming a contributor. I'm ready to assist while you wait for a human maintainer. Let’s tackle this together!
The issue you're encountering is due to a compatibility problem between Superset and Marshmallow 4.0.0. Specifically, the
fields.Integerclass in Marshmallow 4.0.0 no longer supports theminkeyword argument, which is causing the error during Superset's initialization.To resolve this issue, you can downgrade Marshmallow to version 3.26.1, where the
minkeyword argument is still supported. You can do this by running the following command:This should allow Superset to initialize without errors. It seems that the version of Marshmallow is specified in
requirements/development.txt, but there might be an override or update happening elsewhere in the setup process. You may want to check other configuration files or scripts that could be specifying a different version of Marshmallow.To continue talking to Dosu, mention @dosu.
Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other
rusackas commentedon Apr 17, 2025
Is there somewhere we need to pin the dependency? It looks like Superset already installs 3.26.1. I'm not sure about the details of the failure, but I know we also use
marshmallow-sqlalchemywhich doesn't seem to support marshmallow 4.0 yet if I'm understanding correctly.ColinMaudry commentedon Apr 18, 2025
I followed the PyPi install instructions, and running
pip install marshmallow==3.26.1just beforesuperset db upgradedid the trick.amotl commentedon Apr 19, 2025
Hi there,
we are running a little integration test suite against Apache Superset and CrateDB, in order to validate both work together well. Two days ago, CI apparently started tripping on it.
Do you think we need to adjust a few details, or is it just about marshmallow-4.0.0, which has been released two days ago, as suggested above?
With kind regards,
Andreas.
References
ColinMaudry commentedon Apr 19, 2025
@amotl I guess either
minLengthand generally adapts to Marshallow v4minLengthand othersIn the meantime we must force Marshmallow version. How? Depends on how you install superset.
amotl commentedon Apr 20, 2025
Hi. Thank you very much.
I don't completely understand this, yet. Isn't it possible to just add a corresponding version pinning constraint to Superset's main dependencies to handle the situation well, until Superset will be compatible with Marshmallow 4?
ColinMaudry commentedon Apr 20, 2025
Marshmallow is already pinned to the right version in development.txt, via marshmallow-sqlalchemy module requirements, but somehow v4.0.0 gets installed in the end.
ColinMaudry commentedon Apr 20, 2025
If you install it via
pip install superset, Kubernetes or download the docker image, you won't force Marshmallow version the same way. I'm not fluent in Docker, even less in Kubernetes, so I went the PyPi way to fix it.amotl commentedon Apr 21, 2025
Hi Colin, thanks for showing the right dependency pinning in
development.txt. The same, even more important, should also be conducted for the runtime dependencies, right? Otherwise, it will leave the average user stranded like outlined in this thread.amotl commentedon Apr 23, 2025
It looks like the dependency of Marshmallow is also pinned per
base.txt1. Do you have an idea why it isn't used at runtime?Footnotes
https://github.com/apache/superset/blob/4.1.2/requirements/base.txt#L200 ↩
amotl commentedon Apr 23, 2025
Hi again. We submitted a patch to the
4.1branch, in order to improve the situation for Superset 4.Avoid bug with Marshmallow 4
lostlunatiq commentedon Apr 28, 2025
Hi is this fixed? Or can I be assigned this one?
amotl commentedon Apr 28, 2025
Hi. I think it's "in progress". I've just refreshed the patch GH-33216.
26 remaining items
amotl commentedon Jul 19, 2025
@betodealmeida and @michael-s-molina: Can we humbly ask you to apply a variant of this patch also to the
5.0branch?michael-s-molina commentedon Jul 21, 2025
This was already cherry-picked into the 5.0 branch and should be available in the next patch. No ETA for the patch currently.
amotl commentedon Jul 21, 2025
Ah, now I am seeing it. Thanks a lot!
kevin-lann commentedon Sep 27, 2025
Hi, I've been taking a look at this issue and was able to confirm that it still exists.
This is the result of setting "marshmallow>=4" in
pyproject.toml:If no one else is looking at this, me and some others would like to take a stab.
mistercrunch commentedon Sep 28, 2025
go for it! I assigned the issue to you.
kevin-lann commentedon Oct 11, 2025
Progress update on this issue:
We've been able to resolve several of the initialization issues (including the
minLengthissue) by migrating to newer 4.0 marshmallow conventions using this migration guide . They are mainly related to marshmallow Schemas using outdated pre-4.0 conventions. There's quite a few instances of these to fix so will get back once we've covered them all.Additionally we might need to bump
marshmallow-sqlalchemyto 1.5.0+ for better marshmallow 4.0 support, but willl confirm the first approach before resorting to this.mistercrunch commentedon Oct 11, 2025
Thanks for working on this! let us know if you need help/support and when your PR is up for review
kevin-lann commentedon Nov 3, 2025
@mistercrunch Hi, the PR for this is ready for review now! #35920
sloria commentedon Apr 1, 2026
marshmallow maintainer here. just a heads up that we're planning to EOL marshmallow v3 on April 16. I only skimmed #35920 but the marshmallow API changes there looks correct. i didn't get a chance to thoroughly review the Flask-AppBuilder shim. looks like there may already be pending work in FAB to support marshmallow 4
fix(deps): marshmallow 4 compat — abstract Number, default=, lockfile…
fix(deps): marshmallow 4 compat — abstract Number, default=, lockfile…
rusackas commentedon Jun 25, 2026
#39751 took us to marshmallow 4.3.0 with the compatibility work to back it, so this is done - closing. Earlier PRs just pinned <4; this one's the real fix.
amotl commentedon Jun 25, 2026
Wonderful, thank you!