ysde / grafana-backup-tool

A Python-based application to backup Grafana settings by using the Grafana API
MIT License
860 stars 273 forks source link

TypeError: get_grafana_version() missing 1 required positional argument: 'http_get_headers' #242

Closed franeksaww closed 1 year ago

franeksaww commented 1 year ago

Hi! The newest version of Grafana backup doesn't worked for me because of this issue:

There are 0 alert rules: File "/usr/lib/python3.11/site-packages/grafana_backup/save.py", line 74, in main backup_functions[backup_function](args, settings) File "/usr/lib/python3.11/site-packages/grafana_backup/save_contact_points.py", line 24, in main grafana_version = get_grafana_version(grafana_url, verify_ssl) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: get_grafana_version() missing 1 required positional argument: 'http_get_headers'

When I switched to old version 1.3.3 of the package it worked fine. Looks like the issue is here: https://github.com/ysde/grafana-backup-tool/blob/master/grafana_backup/save_contact_points.py#L24

tewfik-ghariani commented 1 year ago

We are facing the same issue 👍

luk-ada commented 1 year ago

I also had to downgrade to 1.3.3, I tried with GRAFANA_HEADERS=Host:my.host.com but this did not help.

########################################
Traceback (most recent call last):
  File "/usr/bin/grafana-backup", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/usr/lib/python3.11/site-packages/grafana_backup/cli.py", line 52, in main
    save(args, settings)
  File "/usr/lib/python3.11/site-packages/grafana_backup/save.py", line 74, in main
    backup_functions[backup_function](args, settings)
  File "/usr/lib/python3.11/site-packages/grafana_backup/save_contact_points.py", line 24, in main
    grafana_version = get_grafana_version(grafana_url, verify_ssl)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: get_grafana_version() missing 1 required positional argument: 'http_get_headers'
acjohnson commented 1 year ago

Please let us know if this is solved in release 1.4.1

Thank you for letting us know!

luk-ada commented 1 year ago

@acjohnson 1.4.1 is working well, thank you for the fix!

created archive at: _OUTPUT_/202309220421.tar.gz