Uncaught RuntimeError in validators.py line 765
Aider version: 0.58.1 Python version: 3.12.2 Platform: Linux-6.8.0-45-generic-x86_64-with-glibc2.39 Python implementation: CPython Virtual environment: No OS: Linux 6.8.0-45-generic (64bit) Git version: git version 2.43.0
An uncaught exception occurred:
Traceback (most recent call last):
File "aider", line 8, in <module>
sys.exit(main())
^^^^^^
File "main.py", line 727, in main
coder.run()
File "base_coder.py", line 730, in run
self.run_one(user_message, preproc)
File "base_coder.py", line 767, in run_one
message = self.preproc_user_input(user_message)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "base_coder.py", line 756, in preproc_user_input
return self.commands.run(inp)
^^^^^^^^^^^^^^^^^^^^^^
File "commands.py", line 231, in run
return self.do_run(matching_commands[0][1:], rest_inp)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "commands.py", line 206, in do_run
return cmd_method(args)
^^^^^^^^^^^^^^^^
File "commands.py", line 946, in cmd_help
self.help = Help()
^^^^^^
File "help.py", line 118, in __init__
Settings.embed_model = HuggingFaceEmbedding(model_name="BAAI/bge-small-en-v1.5")
^^^^^^^^^^^^^^^^^^^^
File "settings.py", line 74, in embed_model
self._embed_model = resolve_embed_model(embed_model)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "utils.py", line 39, in resolve_embed_model
from llama_index.core.bridge.langchain import Embeddings as LCEmbeddings
File "langchain.py", line 2, in <module>
from langchain.agents import (
File "__init__.py", line 40, in <module>
from langchain.agents.agent import (
File "agent.py", line 53, in <module>
from langchain.chains.base import Chain
File "base.py", line 49, in <module>
class Chain(RunnableSerializable[Dict[str, Any], Dict[str, Any]], ABC):
File "main.py", line 197, in __new__
fields[ann_name] = ModelField.infer(
^^^^^^^^^^^^^^^^^
File "fields.py", line 504, in infer
return cls(
^^^^
File "fields.py", line 434, in __init__
self.prepare()
File "fields.py", line 550, in prepare
self._type_analysis()
File "fields.py", line 661, in _type_analysis
self.sub_fields = [self._create_sub_type(t, f'{self.name}_{display_as_type(t)}') for t in types_]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "fields.py", line 806, in _create_sub_type
return self.__class__(
^^^^^^^^^^^^^^^
File "fields.py", line 434, in __init__
self.prepare()
File "fields.py", line 550, in prepare
self._type_analysis()
File "fields.py", line 756, in _type_analysis
self.sub_fields = [self._create_sub_type(self.type_, '_' + self.name)]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "fields.py", line 806, in _create_sub_type
return self.__class__(
^^^^^^^^^^^^^^^
File "fields.py", line 434, in __init__
self.prepare()
File "fields.py", line 555, in prepare
self.populate_validators()
File "fields.py", line 829, in populate_validators
*(get_validators() if get_validators else list(find_validators(self.type_, self.model_config))),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "validators.py", line 765, in find_validators
raise RuntimeError(f'no validator found for {type_}, see `arbitrary_types_allowed` in Config')
RuntimeError: no validator found for <class 'langchain_core.callbacks.base.BaseCallbackHandler'>, see `arbitrary_types_allowed` in Config
Thank you for filing this issue.
Can you please try to install or reinstall aider in a separate Python environment? Either with venv or pipx?
Please remove the existing environment/aider installation first, e.g. with pipx:
$ pipx uninstall aider-chat
uninstalled aider-chat! ✨ 🌟 ✨
$ pipx install aider-chat
installed package aider-chat 0.58.1, installed using Python 3.12.6
These apps are now globally available
- aider
done! ✨ 🌟 ✨
This document may be helpful -> https://aider.chat/docs/troubleshooting/imports.html
I'm closing this issue for now.
If any new related concerns arise, please feel free to comment, and I'll reopen the issue.