From d036fdfc269c764318a72a6ea5c89677939e4d19 Mon Sep 17 00:00:00 2001 From: sabaimran Date: Wed, 3 Apr 2024 17:52:20 +0530 Subject: [PATCH] If tree is not in the contents, then just return empty files list --- src/khoj/processor/content/github/github_to_entries.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/khoj/processor/content/github/github_to_entries.py b/src/khoj/processor/content/github/github_to_entries.py index fb22e7a2..58161879 100644 --- a/src/khoj/processor/content/github/github_to_entries.py +++ b/src/khoj/processor/content/github/github_to_entries.py @@ -127,6 +127,9 @@ class GithubToEntries(TextToEntries): # Extract markdown files from the repository markdown_files = [] org_files = [] + if "tree" not in contents: + return markdown_files, org_files + for item in contents["tree"]: # Find all markdown files in the repository if item["type"] == "blob" and item["path"].endswith(".md"):