Get Key error while performing sf_git fetch
Getting worksheets
This error while debugging can be fixed by commenting out: `
for i, _ in enumerate(worksheets):
content = contents[worksheets[i]._id]
if "query" in content.keys():
worksheets[i].content = content["query"]
# elif "drafts" in content.keys():
# draft_ids = [draft_id for draft_id in content["drafts"].keys()]
# if len(draft_ids) > 0:
# if len(draft_ids) > 1: # keys are timestamps
# last_update_id = str(
# max([int(draft_id) for draft_id in draft_ids])
# )
# else:
# last_update_id = draft_ids[0]
# worksheets[i].content = content["drafts"][last_update_id][
# "query"
# ]
# else:
# worksheets[i].content = ""
else:
worksheets[i].content = ""
if store_to_cache:
save_worksheets_to_cache(worksheets)
`
Traceback (most recent call last):
File "C:\Users\nagas\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\nagas\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 87, in run_code
exec(code, run_globals)
File "C:\Users\nagas\Documents\GitHub\snowflake_notebooks\venv\Scripts\sfgit.exe_main.py", line 7, in