Difference between revisions of "Add-on:Buggalo Exception Collector"

From Official Kodi Wiki
Jump to navigation Jump to search
m (Addon-Bot repo category update)
m (Addon-Bot repo category update)
Tags: Manual revert Reverted
(21 intermediate revisions by the same user not shown)
Line 3: Line 3:
|provider-name=twinther, schapplm
|provider-name=twinther, schapplm
|ID=script.module.buggalo
|ID=script.module.buggalo
|latest-version=1.1.8
|latest-version=1.2.0
|extension point=xbmc.python.module
|extension point=xbmc.python.module
|provides=
|provides=
Line 10: Line 10:
|Platform=all
|Platform=all
|Language=
|Language=
|License=GPLv2
|License=GPL-2.0-or-later
|Forum=http://forum.xbmc.org/showthread.php?tid=121925
|Forum=https://forum.kodi.tv/showthread.php?tid=121925
|Website=http://tommy.winther.nu
|Website=
|Source=https://github.com/twinther/script.module.buggalo
|Source=https://github.com/SchapplM/script.module.buggalo
|Email=
|broken=
|broken=
|icon url=}}
|icon url=}}
Line 91: Line 91:
[[Category:Add-ons with website tag]]
[[Category:Add-ons with website tag]]
[[Category:All add-ons]]
[[Category:All add-ons]]
[[Category:Krypton add-on repository]]
[[Category:Isengard add-on repository]]
[[Category:Gotham add-on repository]]
[[Category:Gotham add-on repository]]
[[Category:Helix add-on repository]]
[[Category:Helix add-on repository]]
[[Category:Isengard add-on repository]]
[[Category:Jarvis add-on repository]]
[[Category:Krypton add-on repository]]
[[Category:Leia add-on repository]]
[[Category:Leia add-on repository]]
[[Category:Jarvis add-on repository]]
[[Category:Matrix add-on repository]]

Revision as of 04:07, 6 June 2021

Buggalo Exception Collector

See this add-on on the kodi.tv showcase

Author: twinther, schapplm

Type: Add-on library/module
Repo: Kodi.tv repo v20
Kodi.tv repo v19
Kodi.tv repo v18

License: GPL-2.0-or-later
Source: Source code
Summary: Automatic exception collector
Home icon grey.png   ▶ Add-ons ▶ Buggalo Exception Collector
Attention talk.png Need help with this add-on? See here.

This module can collect various information about an exception and the users system such as Kodi and Python versions, etc. and submit it to a url.

1 Introduction

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: http://tommy.winther.nu/files/2011/12/script_error.png


2 How to use

To use this script you must do two 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:
   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: https://github.com/xbmc-danish-addons/plugin.video.news.tv2.dk/blob/master/addon.py#L124


3.

Finally you must setup the website where the error report is submitted.
A good starting point is my buggalo-web module on github: https://github.com/twinther/buggalo-web
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.
https://github.com/twinther/buggalo-web/blob/master/submit.php



3 What is collected

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

For further details take a look at the code in buggalo.py


4 Latest code and info

The latest code is always available at github: https://github.com/twinther/script.module.buggalo The module is named after a creature in my favorite animated show: http://theinfosphere.org/Where_the_Buggalo_Roam