UnsupportedValueError on marshmallow.fields.Number
See original GitHub issueRecently I noticed that marshmallow-jsonschema
does not work with marshmallow.fields.Number
field and raises UnsupportedValueError
.
Is there a particular reason why it does not? It works well with marshmallow.fields.Integer
. Maybe we should just map it to Integer
?
Issue Analytics
- State:
- Created 4 years ago
- Comments:10 (10 by maintainers)
Top Results From Across the Web
Python marshmallow.fields.Number() Examples
This page shows Python examples of marshmallow.fields.Number. ... Number): raise UnsupportedValueError( "'Range' validator for non-number fields is not ...
Read more >Fields — marshmallow 3.19.0 documentation
Base class for number fields. Pluck (nested, field_name, **kwargs). Allows you to replace nested data with one of the data's fields.
Read more >How to use the marshmallow.fields.Number function in ... - Snyk
Number function in marshmallow. To help you get started, we've selected a few marshmallow examples, based on popular ways it is used in...
Read more >Marshmallow for python giving ValueError: not enough values ...
Here are my Schema, Model, and Resource file for the same. schemas/post.py from marshmallow import Schema, fields, validate, post_dump from ...
Read more >marshmallow - Read the Docs
from marshmallow import Schema, fields, pprint class ArtistSchema(Schema): ... It has no external dependencies other than the Python standard library.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Who wrote that garbage?? 🤣
I think it’s because
mapping
is basically an inverse ofTYPE_MAPPING
and some of the values needed to be added computationally at run-time based on what’s in the actual schema at hand.I don’t remember why either. I think it may have been because someone wanted to be able to extend & override it more easily, you’d have to dig through the commit history a bit I guess to figure out why that mapping is so weirdly layed out and split apart.