• Stars
    star
    133
  • Rank 272,600 (Top 6 %)
  • Language
    Python
  • License
    GNU Lesser Genera...
  • Created over 11 years ago
  • Updated almost 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Beautiful tracebacks for Python

Catcher - Beautiful tracebacks

python-catcher module generates highly informative crash reports (including source code and locals) in two possible forms:

  • generates a text file report, which you can save it where it is needed to;
  • generates HTML-page-like report, submits it to the web and generates a permalink.

Quick use for HTML-page-like report:

import catcher

try:
    launch_important_stuff()
except Exception as e:
    report = catcher.collect(e)
    html = catcher.formatters.HTMLFormatter().format(report, maxdepth=4)
    url = catcher.uploaders.AjentiOrgUploader().upload(html)

    print('Application has crashed. Please submit this link along with the bug report:')
    print(url)

Quick use for text file report:

import catcher

try:
    print('you cannot' / 'divide this')
except Exception as e:
    report = catcher.collect(e)
    text = catcher.formatters.TextFormatter().format(report)
    with open(f'crash_{report.timestamp}.txt', 'w') as f: f.write(text)

Example text file report:

Error report
~~~~~~~~~~~~
Report generated using python-catcher

Exception has been ocurred at 2021-01-12 20:09:53 and indices the following:
‖   TypeError: unsupported operand type(s) for /: 'str' and 'str'

Traceback:
‖   @ mytest.py, line 6 (frame #0):
‖   |    import catcher
‖   |
‖   |    try:
‖   |        print('you cannot' / 'divide this')
‖   |    except Exception as e:
‖   |        report = catcher.collect(e)
‖   |>>>     text = catcher.formatters.TextFormatter().format(report)
‖   |        with open(f'crash_{report.timestamp}.txt', 'w', encoding = 'utf-8') as f: f.write(text)
‖


Locals:
‖   Frames 0 don`t have locals
‖

Report overview:

http://habrastorage.org/storage2/f05/ea4/779/f05ea4779fccf0087fa24a380bd92b45.png

One stack frame with locals:

http://habrastorage.org/storage2/4b8/188/5fe/4b81885fe8582d835c557af1d71884b9.png

More Repositories

1

tabby

A terminal for a more modern age
TypeScript
57,415
star
2

russh

Rust SSH client & server library
Rust
814
star
3

tabby-web

Tabby Web - an SSH/Telnet/Serial client in your browser.
Python
774
star
4

rust-sinner

Easy c̵̰͠r̵̛̠ö̴̪s̶̩̒s̵̭̀-t̶̲͝h̶̯̚r̵̺͐e̷̖̽ḁ̴̍d̶̖̔ ȓ̵͙ė̶͎ḟ̴͙e̸̖͛r̶̖͗ë̶̱́ṉ̵̒ĉ̷̥e̷͚̍ s̷̹͌h̷̲̉a̵̭͋r̷̫̊ḭ̵̊n̷̬͂g̵̦̃ f̶̻̊ơ̵̜ṟ̸̈́ R̵̞̋ù̵̺s̷̖̅ţ̸͗!̸̼͋
Rust
308
star
5

ajenti-v

Virtual Hosting addon for Ajenti
Python
225
star
6

ajenti

DEPRECATED: Repo moved to https://github.com/ajenti/ajenti (into the `1.x` branch)
Python
209
star
7

reconfigure

Config-file-to-Python mapping library (ORM).
Python
141
star
8

tabby-connection-gateway

Connection gateway for Tabby Web
Python
105
star
9

tabby-docker

Docker plugin for Tabby
TypeScript
46
star
10

instacode

JavaScript
44
star
11

tabby-theme-hype

A Terminus theme that imitates Hyper
SCSS
42
star
12

tabby-save-output

Terminus plugin to save console output into a file
TypeScript
35
star
13

tabby-clickable-links

Plugin that makes URLs and paths in Terminus clickable
TypeScript
35
star
14

macos-native-processlist

NodeJS - native macOS process list loader
C++
22
star
15

windows-native-registry

Native windows registry access for Node
C++
22
star
16

tabby-clippy

An example plugin for Tabby
TypeScript
21
star
17

exconsole

Emergency/postmortem Python console
Python
20
star
18

grip

A better package manager for Python
Python
15
star
19

MyOS

University project
C
10
star
20

terminus-shell-selector

Shell selector popup for Terminus
TypeScript
9
star
21

Labs

Лабораторные
C#
6
star
22

ajenti-customization-demo

Ajenti customization demo
CSS
5
star
23

OldProjects

My old stuff
4
star
24

ORMy

A powerful but lightweight SQLite ORM for Android
Java
4
star
25

awesome-crm

JavaScript
3
star
26

instacode-intellij-plugin

IntelliJ IDEA plugin for instacod.es
Java
3
star
27

fksis-schedule

Java
3
star
28

Cofeepot-Example

HTCPCP example for Ajenti
Python
3
star
29

cargo-llvm-cov-repro

Rust
2
star
30

Defective

A detective game without a detective
C#
2
star
31

Locality

C#
2
star
32

ebank-client

JavaScript
2
star
33

infinity-sampler

Deterministic reservoir sampling for Rust
Rust
2
star
34

shutterspeed2

Rust
2
star
35

eugeny

2
star
36

shutterspeed

super WIP
Rust
1
star
37

terminus-clickable-ips

This plugin makes IPs and file paths in the terminal clickable
TypeScript
1
star
38

native-process-working-directory

C++
1
star
39

car

Python
1
star
40

tabby-events-demo

TypeScript
1
star
41

EscapeFromNewMexico

Escape your sins on a fancy boat for as long as the booze lasts.
C#
1
star
42

angularjs-test-task

JavaScript
1
star
43

loop-bastard

Python
1
star
44

coding-challenge-py

Python
1
star
45

avr-sample

Rust
1
star
46

django-test-task

TSQL
1
star
47

final-master-thesis

TeX
1
star