Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

Extract unique Python exceptions with their traceback from a log file.

Project Description


Extract unique Python-Exceptions with their traceback from a log file.


The extraction logic here is heuristic and may fail you. Don’t depend on it for any life or death situations. Also, please submit feedback on how it could be improved!

## Installational

Clone this repository and install with

python install

This adds a utility called exception or exception.exe to your path.

## Usage

To extract the Python tracebacks from a log called _logfile.txt_, run:

$ exception -f logfile.txt

If you want to exclude certain exceptions, try:

$ exception -f logfile.txt -e ValueError,AttributeError

You can all pass multiple filenames:

$ exception -f logfile1.txt logfile2.txt

This would exclude would exclude any ValueError or AttributeError tracebacks from the output.

The tool can also read the log file from stdout, e.g.:

cat logfile.txt | exception


cat logfile.txt | exception -e ValueError


This is based on [a script]( by [@originell](

This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.


0.1.0 (2016-06-16)

  • First release on PyPI.

Release History

This version
History Node


Download Files

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

Filename, Size & Hash SHA256 Hash Help File Type Python Version Upload Date
(5.7 kB) Copy SHA256 Hash SHA256
Wheel 2.7 Jun 16, 2016
(12.7 kB) Copy SHA256 Hash SHA256
Source None Jun 16, 2016

Supported By

Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Google Google Cloud Servers