Skip to content

pydantic error on getting started example #5

@chris-aeviator

Description

@chris-aeviator

p311

EDIT:

concerns the example at https://factryflow.github.io/factryengine/#documentation

    task1 = Task(id=1, duration=3, priority=2, resources=[[resource]])
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/korny/micromamba/envs/tofutime/lib/python3.11/site-packages/pydantic/main.py", line 171, in __init__
    self.__pydantic_validator__.validate_python(data, self_instance=self)
pydantic_core._pydantic_core.ValidationError: 1 validation error for Task
  Value error, Either assignments or constraints must be set [type=value_error, input_value={'id': 1, 'duration': 3, ...iciency_multiplier=1)]]}, input_type=dict]
    For further information visit https://errors.pydantic.dev/2.6/v/value_error
``

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions