Skip to content

Conversation

0sujaljain0
Copy link

@0sujaljain0 0sujaljain0 commented Jul 31, 2025

fixes #293
@antifuchs @gustavosoares @aerickson @suhlig @danrue Can you verify?

Previously, without this fix, I tried printing versions using the following code piece:

def get_individual_versions(versions, folder_path, log_file, grafana_url, http_get_headers, verify_ssl, client_cert, debug, pretty_print):
    file_path = folder_path + '/' + log_file
    



    # I added this part
    #########################
    with open("versions.txt", "w") as f:


        f.write(f"{folder_path} -> {repr(versions)}\n")
    #############################
    
    if versions:
        with open(u"{0}".format(file_path), 'w') as f:
            for version in versions:
                print(f"{{  versions: {type(version)}: {version} }}")
                (status, content) = get_version(version['dashboardId'], version['version'], grafana_url, http_get_headers, verify_ssl, client_cert, debug)
                if status == 200:
                    save_version(str(version['version']), content, folder_path, pretty_print)
                    f.write('{0}\n'.format(version['version']))

and we needed access to versions['versions'].

@0sujaljain0
Copy link
Author

@ysde Can you take a look at this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TypeError: string indices must be integers, not 'str'

1 participant