Skip to main content

A Python library to log any exceptions to standard out.

Project description

This library is designed to print any exceptions which a Python program encounters when it is run to standard out.


In terminal run -> pip3 install tinycrashreporter

This is enough to get the modlue working as it should. However, to run the samples and unit tests. Also…

Navigate to the location that you want to keep the package.

In terminal run -> pip download tinycrashreporter

Then in the same folder…

In terminal run-> tar -xvzf tinycrashreporter-1.0.3.tar.gz to extract the downloaded files.

You’re ready to get started!

The library code also workes in Python 2.7 but there is not yet a PIP package for that one.


  1. Import both sys and the tinycrashreporter library into your program.
  2. Add the line -> sys.excepthook = tinycrashreporter.crashReportExceptHook <- bellow your imports.
  3. In terminal run-> Python3 ~/PythonFiles/

Warning: IDLE and other IDE’s appear to use the same method override as Tiny Crash Reporter and are not currently supported. Please run from a command line instead.


Add the following lines of code into a blank python file.

#!/usr/bin/env python
# set up tiny crash reporter:
import sys
import (...any_other_module...)
import tinycrashreporter

sys.excepthook  = tinycrashreporter.crashReportExceptHook

# Add some crashy code

Blank file:

A blank file, which includes the code above and conforms to the specification has been included DownloadedPackageLocation/Samples/

In teminal run -> python3

File with options:

A file DownloadedPackageLocation/ has also been set up which supports the execution of code passed as an argument. This is for testing purposes and this code should not be published as part of a release project due to its inherent insecurities.

In terminal run -> python3

Unit tests:

8 Tests are available in DownloadedPackageLocation/Samples/ To run these, open DownloadedPackageLocation/Tests/ manually edit the file path to point to DownloadedPackageLocation/Tests/ Then…

In terminal run -> python3 ~/SampleLocation/ -v

One of the tests requests user to input some crashy code. This facility doesn’t work with ” or ‘ characters and the inclusion of some other special characters may cause similar errors. More work is needed to properly escape the input. If in doubt, the default test will run on pressing enter.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tinycrashreporter-1.0.3.tar.gz (8.3 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page