Help needed debugging grafanimate [solved]

Short version:
ran into error:
mozversion.errors.LocalAppNotFoundError: Application not found at: /usr/bin

Long version:
Aim: to generate animations from building hive temp matrix snapshots.

Done:

  • installed grafanimate following how to setup
  • created folder animations
  • created scenario.py:
import logging
from datetime import datetime

from grafanimate.model import AnimationScenario, AnimationSequence, SequencingMode

logger = logging.getLogger(__name__)


def hourly():

    logger.info("Running Bautraube hourly")

    return AnimationScenario(
        grafana_url="https://swarm.hiveeyes.org/",
        dashboard_uid="epWh_vyIz",
        sequences=[
            AnimationSequence(
                start="2024-05-21T17:00:00Z",
                stop="now",
                every="1h",
                mode=SequencingMode.CUMULATIVE,
            ),
        ],
    )


def daily():

    logger.info("Running Bautraube daily")

    return AnimationScenario(
        grafana_url="https://swarm.hiveeyes.org/",
        dashboard_uid="epWh_vyIz",
        sequences=[
            AnimationSequence(
                start="2024-05-22T01:00:00Z",
                stop="now",
                every="1d",
                mode=SequencingMode.CUMULATIVE,
            ),
        ],
    )
  • ran ./grafanimate --scenario=scenario.py:daily --output=animations/daily

Error:
mozversion.errors.LocalAppNotFoundError: Application not found at: /usr/bin

Complete run output:

2024-05-31 12:41:54,855 [<unknown>                     ] INFO   : Running Bautraube daily
2024-05-31 12:41:54,858 [grafanimate.grafana           ] INFO   : Starting GrafanaWrapper on https://swarm.hiveeyes.org/
2024-05-31 12:41:54,858 [grafanimate.marionette        ] INFO   : Starting Marionette Gecko wrapper
2024-05-31 12:41:54,858 [grafanimate.marionette        ] INFO   : Found "firefox" program at /usr/bin/firefox
2024-05-31 12:41:54,858 [grafanimate.marionette        ] INFO   : Check for running instance of Marionette/Firefox at localhost:2828
2024-05-31 12:41:54,859 [grafanimate.marionette        ] INFO   : Will launch new Marionette/Firefox instance
Traceback (most recent call last):
  File "/home/mois/Dokumente/bienen/bienenwaage/opt/.venv/bin/./grafanimate", line 8, in <module>
    sys.exit(run())
  File "/home/mois/Dokumente/bienen/bienenwaage/opt/.venv/lib/python3.10/site-packages/grafanimate/commands.py", line 172, in run
    grafana = make_grafana(scenario.grafana_url, options["use-panel-events"])
  File "/home/mois/Dokumente/bienen/bienenwaage/opt/.venv/lib/python3.10/site-packages/grafanimate/core.py", line 32, in make_grafana
    grafana.boot_firefox(headless=False)
  File "/home/mois/Dokumente/bienen/bienenwaage/opt/.venv/lib/python3.10/site-packages/grafanimate/marionette.py", line 80, in boot_firefox
    self.marionette = Marionette(
  File "/home/mois/Dokumente/bienen/bienenwaage/opt/.venv/lib/python3.10/site-packages/marionette_driver/marionette.py", line 543, in __init__
    self.instance = GeckoInstance.create(
  File "/home/mois/Dokumente/bienen/bienenwaage/opt/.venv/lib/python3.10/site-packages/marionette_driver/geckoinstance.py", line 332, in create
    app_id = mozversion.get_version(binary=kwargs["bin"])["application_id"]
  File "/home/mois/Dokumente/bienen/bienenwaage/opt/.venv/lib/python3.10/site-packages/mozversion/mozversion.py", line 127, in get_version
    version = LocalVersion(binary)
  File "/home/mois/Dokumente/bienen/bienenwaage/opt/.venv/lib/python3.10/site-packages/mozversion/mozversion.py", line 100, in __init__
    raise errors.LocalAppNotFoundError(path)
mozversion.errors.LocalAppNotFoundError: Application not found at: /usr/bin

Please report problems to Issues · grafana-toolbox/grafanimate · GitHub. Currently, I don’t have much capacities, but there are chances other people from the community may be able to support.

I am not sure you will be able to run this on a Raspberry Pi or similar, but I also don’t have any solid information that it doesn’t work per se. Good luck!

Maybe you are tripping into Debian Firefox ESR not used · Issue #18 · grafana-toolbox/grafanimate · GitHub. There may have been a fix with find_firefox: Improve finding executable to `firefox-esr` · grafana-toolbox/grafanimate@10b9b2d · GitHub, but apparently, it may not have been converged into a corresponding release.

In this case, you may want to try to install directly from the repository, preferably into a Python virtualenv.

pip install 'grafanimate @ git+https://github.com/grafana-toolbox/grafanimate'
1 Like

(i am not trying this on a pi. its a linux mint 21.3 desktop. still not a debian: firefox-esr not available.)

i pip installed grafanimate like you proposed.

firefox is found but now im tripping into timeout looking for firefox-marionette at 127.0.0.1:2828:

2024-05-31 14:41:11,607 [grafanimate.marionette        ] INFO   : Found "firefox" program at None
2024-05-31 14:41:11,607 [grafanimate.marionette        ] INFO   : Check for running instance of Marionette/Firefox at localhost:2828
2024-05-31 14:41:11,608 [grafanimate.marionette        ] INFO   : Will launch new Marionette/Firefox instance
Traceback (most recent call last):
  File "/home/mois/.local/bin/grafanimate", line 8, in <module>
    sys.exit(run())
  File "/home/mois/.local/lib/python3.10/site-packages/grafanimate/commands.py", line 172, in run
    grafana = make_grafana(scenario.grafana_url, options["use-panel-events"])
  File "/home/mois/.local/lib/python3.10/site-packages/grafanimate/core.py", line 32, in make_grafana
    grafana.boot_firefox(headless=False)
  File "/home/mois/.local/lib/python3.10/site-packages/grafanimate/marionette.py", line 93, in boot_firefox
    self.marionette.start_session()
  File "/home/mois/.local/lib/python3.10/site-packages/marionette_driver/decorators.py", line 34, in _
    m._handle_socket_failure()
  File "/home/mois/.local/lib/python3.10/site-packages/marionette_driver/marionette.py", line 736, in _handle_socket_failure
    reraise(exc_cls, exc, tb)
  File "/usr/lib/python3/dist-packages/six.py", line 719, in reraise
    raise value
  File "/home/mois/.local/lib/python3.10/site-packages/marionette_driver/decorators.py", line 24, in _
    return func(*args, **kwargs)
  File "/home/mois/.local/lib/python3.10/site-packages/marionette_driver/marionette.py", line 1281, in start_session
    self.raise_for_port(timeout=timeout)
  File "/home/mois/.local/lib/python3.10/site-packages/marionette_driver/marionette.py", line 660, in raise_for_port
    raise socket.timeout(
TimeoutError: Timed out waiting for connection on 127.0.0.1:2828!

thanks so far!
i will deliver this error message to grafanimate’s issues page.

Update: It is working on a more or less clean Debian 12 system.
so: solved!
thanks again!

scenario-daily--bautraube-hive2--epWh_vyIz
every night at 1:00
(and yes, it takes another few week until it is a real clip.)

3 Likes