Skip to main content

Python error reporter that generates detailed HTML/TXT crash reports.

Project description

🛡️Crashprobe - makes errors simple, understandable, and beautiful, and generates HTML/TXT reports about them.

Python License

Examples:

Crashprobe HTML report example:

Crashprobe HTML report example

Crashprobe TXT report example:

Crashprobe TXT report example

A library that intercepts errors and creates beautiful, detailed HTML reports.

📦Installation

pip install crashprobe

🚀Quick Start

import crashprobe
crashprobe.start()
print(1/0) # ZeroDivisionError - watch the magic!

✨Crashprobe Features

  • No dependencies
  • Beautiful, easy-to-read dark theme in reports
  • System information
  • Very easy to use
  • Copy report button
  • Useful links with error information
  • Support for text reports (TXT)
  • Ability to disable auto-opening of the browser
  • Reports are saved in a separate folder for each file
  • Catches errors in threads – automatically works with threading (no extra code required).

📃Usage

Library import:

import crashprobe

Start the error catcher. If the program crashes with an error, the library will intercept it, generate an HTML report, automatically open it, and save it in the nameOfYourFile_crash_dir folder:

crashprobe.start()

The generated page is saved in the automatically created nameOfYourFile_crash_dir folder as a file named crash_Y-M-D_H-M-S. Read the details below 👇🏻

Stop the error catcher:

crashprobe.stop()

⚙️crashprobe.start() - Method Settings

The crashprobe.start() method accepts two optional arguments to customize the format and display of error reports.

Report arguments

Parameter Type Default Values Description
auto_open bool True True, False This parameter allows you to configure automatic report opening once the error is captured.
file_format str "html" "html", "txt" Specifies the file format for the generated report.(Case-insensitive)
hide_secrets list [] ["your_secret_var", "password"] Allows you to replace the variable value in the report with * to hide passwords, secrets, tokens, and so on.

Report contents

  • HTML page: beautiful dark theme, emoji, as well as the error title, error text, exact date and time, path to the file containing the error, the line containing the error and its closest links, values ​​and types of local variables, system information and Python version, links to Google and the Python documentation for information about the error, and a copy report button.

  • TXT file: error title, error text, exact date and time, path to the file containing the error, the line containing the error and its closest links, values and types of local variables, system information, and Python version, links to Google and the Python documentation for information about the error.

Example (All defaults):

import crashprobe
crashprobe.start()
def example(x, y):
    one = x
    two = y
    return x / y
print(example(1, "Hello"))

The library will create a folder named [name_of_your_file]_crash_dir to store reports. The display behavior depends on your settings:

file_format auto_open Resulting action
"html" True Opens the report on your web browser
"html" False Saves only (no automatic display)
"txt" True Prints the report content to the console
"txt" False Saves only (no console output)

Example:

import crashprobe
crashprobe.start(auto_open = False, file_format = 'html', hide_secrets=["x"])
def example(x, y):
    one = x
    two = y
    return x / y
print(example(1, "Hello"))

🛑 Stopping the error catcher

If you need to temporarily disable crashprobe (for example, to see the standard Python traceback or to avoid conflicts with another error handler), call crashprobe.stop(). After that, uncaught exceptions will be handled by the default Python exception hook.

Example:

import crashprobe
crashprobe.start()
def example(x, y):
    one = x
    two = y
    return x / y
crashprobe.stop()
print(example(1, "Hello")) # Exception will be handled by the default Python exception hook

❔Why is it convenient?

To get started, you only need to write two lines of code, and in the event of an error, you get a beautiful HTML report instead of a console message.

Without crashprobe:

Before crashprobe

With crashprobe:

With crashprobe

❔Whats new in 0.4.0?

  • Thread support – Crashprobe now catches unhandled exceptions in any thread.
  • Thread info in reports – thread name and ID are displayed in the System section.
  • Improved documentation.

👦🏻 About the developer

My name is Andrey Egupov, I'm 11 years old. I've been programming for several years. I started in Scratch, now I write in Python, JavaScript, and I'm working with Arduino. I got tired of seeing red error messages and having to print variable values, so I decided to create a truly useful tool that would help me and others!

📄 License

MIT © 2026 Andrey Egupov (11-year-old-developer)

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

crashprobe-0.4.0.tar.gz (6.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

crashprobe-0.4.0-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

Details for the file crashprobe-0.4.0.tar.gz.

File metadata

  • Download URL: crashprobe-0.4.0.tar.gz
  • Upload date:
  • Size: 6.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for crashprobe-0.4.0.tar.gz
Algorithm Hash digest
SHA256 0474778dda4bc3eb2a8f10d242cfe8aa163096fcb03bf808d4e7b03904b860f6
MD5 98951d59eb4e2a10ebbefc6178440244
BLAKE2b-256 22ca050b5bf16959f9b90ca8866f363c959481e1fbfb54d1b0f442df3f3b2b6b

See more details on using hashes here.

File details

Details for the file crashprobe-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: crashprobe-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 7.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for crashprobe-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 aceb7c46404b1174f06cb29b9fef3626e74a104bc96449ea3ba56f0bbc87ad14
MD5 3ce51a9a1af36b2e6be407e716e03486
BLAKE2b-256 99e6af33fff97b73050fdf8094a51e3024f2eb78f361a1e56bdf90c908e83523

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page