new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

Pydantic · all subjects

errors/error-codes

152 notes in this subject, read out of this brain and free to use. This is page 3 of 3.

datetime_past error when value is not in the past for PastDatetime field

The datetime_past error is raised when the value provided for a PastDatetime field is not in the past.

datetime_type error when input type is invalid for datetime field

The datetime_type error is raised when the input value's type is not valid for a datetime field, such as None. This error is also raised for strict fields when the input value is not an instance of datetime.

decimal_max_digits error when Decimal has too many digits

The decimal_max_digits error is raised when the value provided for a Decimal has too many digits, exceeding the max_digits constraint.

decimal_max_places error when Decimal has too many decimal places

The decimal_max_places error is raised when the value provided for a Decimal has too many digits after the decimal point, exceeding the decimal_places constraint.

decimal_parsing error when Decimal cannot be parsed

The decimal_parsing error is raised when the value provided for a Decimal could not be parsed as a decimal number.

decimal_type error when Decimal value is wrong type

The decimal_type error is raised when the value provided for a Decimal is of the wrong type. This error is also raised for strict fields when the input value is not an instance of Decimal.

decimal_whole_digits error when Decimal has too many whole digits

The decimal_whole_digits error is raised when the value provided for a Decimal has more digits before the decimal point than max_digits - decimal_places when both are specified.

default_factory_not_called error when default factory cannot be called

The default_factory_not_called error is raised when a default factory taking validated data cannot be called because validation failed on previous fields.

dict_type error when input type is not dict

The dict_type error is raised when the input value's type is not dict for a dict field.

ellipsis_error when input is not Ellipsis literal

The ellipsis_error is raised when the input isn't the Ellipsis literal.

enum error when value does not exist in enum members

The enum error is raised when the input value does not exist in an enum field's members.

extra_forbidden error when extra fields present and extra='forbid'

The extra_forbidden error is raised when the input value contains extra fields but model_config['extra'] == 'forbid'.

finite_number error when value is infinite or too large

The finite_number error is raised when the value is infinite or too large to be represented as a 64-bit floating point number during validation.

float_parsing error when string cannot be parsed as float

The float_parsing error is raised when the value is a string that cannot be parsed as a float.

float_type error when input type is invalid for float field

The float_type error is raised when the input value's type is not valid for a float field, such as None.

fraction_parsing error when value cannot be parsed as fraction

The fraction_parsing error is raised when the value provided for input cannot be parsed as a fraction.

fraction_type error when Fraction value is wrong type

The fraction_type error is raised when the value provided for a Fraction is of the wrong type.

frozen_field error when assigning to frozen field

The frozen_field error is raised when you attempt to assign a value to a field with frozen=True, or to delete such a field.

frozen_instance error when frozen model instance is modified

The frozen_instance error is raised when frozen is set in the configuration and you attempt to delete or assign a new value to any of the fields.

frozen_set_type error when input type is invalid for frozenset field

The frozen_set_type error is raised when the input value's type is not valid for a frozenset field.

get_attribute_error when from_attributes=True and attribute read fails

The get_attribute_error is raised when model_config['from_attributes'] == True and an error is raised while reading the attributes.

greater_than error when value is not greater than gt constraint

The greater_than error is raised when the value is not greater than the field's gt constraint.

greater_than_equal error when value is not >= ge constraint

The greater_than_equal error is raised when the value is not greater than or equal to the field's ge constraint.

int_from_float error when float provided for int field

The int_from_float error is raised when you provide a float value for an int field.

int_parsing error when value cannot be parsed as int

The int_parsing error is raised when the value cannot be parsed as int.

int_parsing_size error when int string exceeds maximum length

The int_parsing_size error is raised when attempting to parse a Python or JSON value from a string outside the maximum range that Python str to int parsing permits. The limit is 4300 digits.

int_type error when input type is invalid for int field

The int_type error is raised when the input value's type is not valid for an int field, such as None.

invalid_key error when dict key is not a string instance

The invalid_key error is raised when attempting to validate a dict that has a key that is not an instance of str.

is_instance_of error when input is not instance of expected type

The is_instance_of error is raised when the input value is not an instance of the expected type.

is_subclass_of error when input is not subclass of expected type

The is_subclass_of error is raised when the input value is not a subclass of the expected type.

error type: int_parsing

The 'int_parsing' error type occurs when Pydantic cannot parse input as a valid integer.

error type: missing

The 'missing' error type occurs when a required field is not provided in the input data.

Give your agent this brain