ysde/grafana-backup-tool

TypeError: list indices must be integers or slices, not str

scrissti opened this issue · 1 comments

Save worked fine but restore immediately after on the same grafana instance or on to another grafana instance failes with following error:
Traceback (most recent call last):
File "/opt/homebrew/bin/grafana-backup", line 8, in
sys.exit(main())
File "/opt/homebrew/lib/python3.9/site-packages/grafana_backup/cli.py", line 55, in main
restore(args, settings)
File "/opt/homebrew/lib/python3.9/site-packages/grafana_backup/restore.py", line 96, in main
restore_components(args, settings, restore_functions, tmpdir)
File "/opt/homebrew/lib/python3.9/site-packages/grafana_backup/restore.py", line 134, in restore_components
restore_functions[ext](args, settings, file_path)
File "/opt/homebrew/lib/python3.9/site-packages/grafana_backup/create_library_element.py", line 19, in main
folder_id = get_folder(folder_uid, grafana_url, http_post_headers, verify_ssl, client_cert, debug)[1]['id']
TypeError: list indices must be integers or slices, not str

ysde commented

Hi @scrissti
Could you provide the saved file so that we can test it.
It seems that the stored data doesn't have 'id' attribute.