Tree [112303] eden / script.module.buggalo /

File Date Author Commit
lib 2012-09-24 amet amet [2bde8a] [script.module.buggalo] -v1.1.2
resources 2012-09-24 amet amet [2bde8a] [script.module.buggalo] -v1.1.2
LICENSE.txt 2012-03-19 amet amet [2c1281] [script.module.buggalo] -v 1.0.1 2012-09-24 amet amet [2bde8a] [script.module.buggalo] -v1.1.2
addon.xml 2012-09-24 amet amet [2bde8a] [script.module.buggalo] -v1.1.2
changelog.txt 2012-09-24 amet amet [2bde8a] [script.module.buggalo] -v1.1.2

Read Me


The buggalo script can collect various information about an
exception in a Python script as well as information about the
users system, such as XBMC and Python versions.

The collected information is then posted to the internet at a
predefined URL where the addon author can investigate the exception.

The script is somewhat similar to posting the xbmc.log to pastebin,
but is more specialised and doesn't contain superfluous information.
It is also better integrated into the user experience, the user only
has to decide if they want to submit the bug report or not.

The user will see a dialog as seen in this screenshot:


To use this script you must do these things besides importing it.

  1. Set buggalo.SUBMIT_URL to a full URL where the collected data is submitted.

  2. Surround the code you want to be covered by this script in a try..except block, such as:

    python try # addon logic except Exception: buggalo.onExceptionRaised()

    For plugin type addons, it is a good idea to include pretty much
    everything inside the try..except block.
    See this link for an example:

    For script type addons, besides the rule above, each event in
    your UI should include the try..except block as well.
    See this link for an example:

    Optionally, instead of writing the try..except block yourself, you can decorate the function
    with @buggalo_try_except(). Function specific may be provide in the decorator:

    python @buggalo_try_except({'class' : 'MyWindowXML', 'method' : 'onInit', 'other_key' : 'other_value'}) def onInit(self) pass

  3. Finally you must setup the website where the error report is submitted.
    A good starting point is my buggalo-web module on github:
    If you want to roll your own custom setup then take a look at the submit.php
    file which store the error report in the database.

    If you don't want to or can't setup your own website you can use the shared site at:
    In this case buggalo.SUBMIT_URL must be set to:


Five groups of information is collected beyond basic information
such as date and time.

  • System information
    OS name and version, kernel version, etc.
  • Addon information
    Addon id, name, version, path, etc.
  • XBMC Information
    Build version and date, the current skin and language
  • Execution information
    Python version and sys.argv
  • Exception information
    Type of exception, message and full stack trace
  • User flow information
    For plugin-type addons each request is recorded with parameters and timestamp
    For script-type addons the author must record relevant information by invoking the trackUserFlow() method

For further details take a look at the code in


A new feature in version 1.1.0 is the option to track the users flow when the user navigate through
the addon. This can somewhat be compared to an access log from the apache webserver.

Buggalo will keep track of the userflow for individual addons and store it up to 24 hours.
This also means that when an error report is sent it contains the userflow for the last 24 hours.

python buggalo.trackUserFlow('event information')

  • For plugin-type addons the userflow is automatically tracked.
    It is possible for the addon author to track additional events by invoking the trackuserFlow() method.

  • For script-type addons the addon author must invoke the trackUserFlow() method with relevant information.
    This could be pretty much anything, it could fx be used to track navigation insde a customer UI.

The latest code is always available at github:

The module is named after a creature in my favorite animated show:

2012.09.19 - twinther