Skip to main content

Get and open StackOverflow posts for your tracebacks.

Project description

sotrace

This package opens up StackOverflow posts for your errors. It's the ultimate efficiency tool!

Example Usage

from sotrace import open_link


try:
    my_dict = {}
    print(my_dict[1])
except Exception as e:
    open_link(e)
from sotrace import open_link


open_link("What does the yield keyword do?", tags=["python", "generator"], num_of_results=3)

sotrace can also be run from the command line as a wrapper of sorts.

❯ python3 -m sotrace example2.py
Traceback (most recent call last):
  File "example2.py", line 2, in <module>
    print(my_dict[1])
KeyError: 1
(Opens links)

More arguments can be found using python3 -m sotrace -h, which gives:

❯ python3 -m sotrace -h
usage: __main__.py [-h] [--results RESULTS] [--tags TAGS [TAGS ...]] [--not-pretty] file

positional arguments:
  file                  File to execute with sotrace.

optional arguments:
  -h, --help            show this help message and exit
  --results RESULTS     Number of results to open.
  --tags TAGS [TAGS ...]
                        Preferred tags.
  --not-pretty          Don't use prettier tracebacks from the rich library. (not recommended)

Roadmap

  • Documentation
  • Default issue template
  • Github Actions

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

sotrace-1.1.2.tar.gz (3.7 kB view hashes)

Uploaded Source

Built Distribution

sotrace-1.1.2-py3-none-any.whl (4.0 kB view hashes)

Uploaded Python 3

Supported by

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