I had to add this dependency, otherwise, I got this error:
Traceback (most recent call last):
File "/Users/markhneedham/projects/docs-bot/index.py", line 1, in <module>
kb_loader = GitLoader(
^^^^^^^^^
NameError: name 'GitLoader' is not defined
(env) $ python index.py
(env) $ python index.py
Traceback (most recent call last):
File "/Users/markhneedham/projects/docs-bot/env/lib/python3.11/site-packages/langchain/document_loaders/git.py", line 33, in load
from git import Blob, Repo # type: ignore
^^^^^^^^^^^^^^^^^^^^^^^^^^
ModuleNotFoundError: No module named 'git'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/Users/markhneedham/projects/docs-bot/index.py", line 26, in <module>
kb_data = kb_loader.load()
^^^^^^^^^^^^^^^^
File "/Users/markhneedham/projects/docs-bot/env/lib/python3.11/site-packages/langchain/document_loaders/git.py", line 35, in load
raise ImportError(
ImportError: Could not import git python package. Please install it with `pip install GitPython`.
I had to add this dependency, otherwise, I got this error: