```fail = self._create_fail_tool() Traceback (most...
# marvin-ai
d
Copy code
fail = self._create_fail_tool()
Traceback (most recent call last):
  Debug Console, prompt 18, line 119
builtins.AttributeError: __pydantic_core_schema__

During handling of the above exception, another exception was raised:

Traceback (most recent call last):
  File "/home/dave/.cache/pypoetry/virtualenvs/rustmonster-GKhQY2Y4-py3.10/lib/python3.10/site-packages/controlflow/tasks/task.py", line 254, in _serialize_tools
    tools = controlflow.tools.as_tools(tools)
  File "/home/dave/.cache/pypoetry/virtualenvs/rustmonster-GKhQY2Y4-py3.10/lib/python3.10/site-packages/controlflow/llm/tools.py", line 169, in as_tools
    t = Tool.from_lc_tool(t)
  File "/home/dave/.cache/pypoetry/virtualenvs/rustmonster-GKhQY2Y4-py3.10/lib/python3.10/site-packages/controlflow/llm/tools.py", line 128, in from_lc_tool
    parameters=tool.args_schema.schema(),
builtins.AttributeError: 'NoneType' object has no attribute 'schema'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  Debug Console, prompt 18, line 1
    import datetime
  File "/home/dave/.cache/pypoetry/virtualenvs/rustmonster-GKhQY2Y4-py3.10/lib/python3.10/site-packages/controlflow/tasks/task.py", line 468, in _create_fail_tool
    return Tool.from_function(
  File "/home/dave/.cache/pypoetry/virtualenvs/rustmonster-GKhQY2Y4-py3.10/lib/python3.10/site-packages/controlflow/llm/tools.py", line 83, in from_function
    parameters = TypeAdapter(fn).json_schema()
  File "/home/dave/.cache/pypoetry/virtualenvs/rustmonster-GKhQY2Y4-py3.10/lib/python3.10/site-packages/pydantic/type_adapter.py", line 264, in __init__
    self._init_core_attrs(rebuild_mocks=False)
  File "/home/dave/.cache/pypoetry/virtualenvs/rustmonster-GKhQY2Y4-py3.10/lib/python3.10/site-packages/pydantic/type_adapter.py", line 142, in wrapped
    return func(self, *args, **kwargs)
  File "/home/dave/.cache/pypoetry/virtualenvs/rustmonster-GKhQY2Y4-py3.10/lib/python3.10/site-packages/pydantic/type_adapter.py", line 289, in _init_core_attrs
    schema_type_name=str(self._type),
  File "/home/dave/.cache/pypoetry/virtualenvs/rustmonster-GKhQY2Y4-py3.10/lib/python3.10/site-packages/controlflow/tasks/task.py", line 175, in __repr__
    serialized = self.model_dump()
  File "/home/dave/.cache/pypoetry/virtualenvs/rustmonster-GKhQY2Y4-py3.10/lib/python3.10/site-packages/pydantic/main.py", line 364, in model_dump
    return self.__pydantic_serializer__.to_python(
pydantic_core._pydantic_core.PydanticSerializationError: Error calling function `_serialize_tools`: AttributeError: 'NoneType' object has no attribute 'schema'