crewAI icon indicating copy to clipboard operation
crewAI copied to clipboard

pydantic.errors.PydanticUserError: A non-annotated attribute was detected: `base_directory =

Open steelliberty opened this issue 9 months ago • 0 comments

I have updated to your most recent versions Package operations: 0 installs, 6 updates, 0 removals

  • Updating python-dotenv (1.0.0 -> 1.0.1)
  • Updating mako (1.3.3 -> 1.3.5)
  • Updating openai (1.29.0 -> 1.30.1)
  • Updating pyarrow (16.0.0 -> 16.1.0)
  • Updating pyright (1.1.362 -> 1.1.363)
  • Updating crewai (0.30.10 -> 0.30.11). ***

Full Stack Trace Traceback (most recent call last): File "", line 1, in File "/usr/local/Cellar/[email protected]/3.11.6_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/importlib/init.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "", line 1204, in _gcd_import File "", line 1176, in _find_and_load File "", line 1147, in _find_and_load_unlocked File "", line 690, in _load_unlocked File "", line 940, in exec_module File "", line 241, in _call_with_frames_removed File "/Users/jm/jmautogpt/news_agency_1/main.py", line 7, in from crew import NewsSourceResearcher File "/Users/jm/jmautogpt/news_agency_1/crew.py", line 12, in @CrewBase ^^^^^^^^ File "/Users/jm/jmautogpt/news_agency_1/.venv/lib/python3.11/site-packages/crewai/project/crew_base.py", line 13, in CrewBase class WrappedClass(cls): File "/Users/jm/jmautogpt/news_agency_1/.venv/lib/python3.11/site-packages/pydantic/_internal/_model_construction.py", line 93, in new private_attributes = inspect_namespace( ^^^^^^^^^^^^^^^^^^ File "/Users/jm/jmautogpt/news_agency_1/.venv/lib/python3.11/site-packages/pydantic/_internal/_model_construction.py", line 406, in inspect_namespace raise PydanticUserError( pydantic.errors.PydanticUserError: A non-annotated attribute was detected: base_directory = PosixPath('/Users/jm/jmautogpt/news_agency_1'). All model fields require a type annotation; if base_directory is not meant to be a field, you may be able to resolve this error by annotating it as a ClassVar or updating model_config['ignored_types'].

steelliberty avatar May 15 '24 12:05 steelliberty