Skip to content

Commit 048638b

Browse files
committed
fix: TypeError: string indices must be integers, not 'str'
1 parent 9f5ba3e commit 048638b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

sources/gc-qa-rag-etl/etlapp/ved/initialize_forum_qa.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ def start_initialize_forum_qa(context: EtlRagContext) -> None:
149149
forum_file_path = f"{root_path}/das/.temp/forum/qa/{product}/combined.json"
150150
folder_path = f"{root_path}/etl_forum_qa/.temp/outputs_embedding/{product}"
151151

152-
thread_list = json.loads(read_text_from_file(forum_file_path))
152+
thread_list = json.loads(read_text_from_file(forum_file_path))['threads']
153153
thread_dict = {
154154
f"{thread['tid']}_{thread['postDate']}": thread for thread in thread_list
155155
}

sources/gc-qa-rag-etl/etlapp/ved/initialize_forum_tutorial.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ def start_initialize_forum_tutorial(context: EtlRagContext) -> None:
155155
forum_file_path = f"{root_path}/das/.temp/forum/tutorial/{product}/combined.json"
156156
folder_path = f"{root_path}/etl_forum_tutorial/.temp/outputs_embedding/{product}"
157157

158-
thread_list = json.loads(read_text_from_file(forum_file_path))
158+
thread_list = json.loads(read_text_from_file(forum_file_path))['threads']
159159
thread_dict = {
160160
f"{thread['tid']}_{thread['postDate']}": thread for thread in thread_list
161161
}

0 commit comments

Comments
 (0)