Skip to main content

Alt Text

GoodError Documentation

The GoodError library provides an improved exception handling mechanism in Python. It allows you to enhance the output of exceptions, including sending them to GPT-3 for additional context.

Installation

To install GoodError, use pip:

pip install gooderror

Example

Here's an example of how to use GoodError:

from gooderror import GoodError

GoodError()

x = "SADfsadf" + 5

# GoodError will enhance the exception output and will add COLORS!
# OUTPUT:
#<module>, TypeError(Can only concatenate str (not "int") to str)
#main, Line 82 -> m = "SADfsadf" + 5

Class: GoodError

The GoodError class provides the following attributes and methods:

Attributes

  • gpt_key (str): Your GPT API key.
  • use_colors (bool): Whether to use colors in the output.

GPT3.5 Usage

Import the GoodError class and initialize it with your GPT API key.

from gooderror import GoodError

# Initialize GoodError with your GPT API key
GoodError(gpt_key="YOUR_GPT_API_KEY")

result = 0/0

# OUTPUT:
#<module>, ZeroDivisionError(Division by zero)
#main, Line 80 -> result = 0/0

#Waiting for GPT to respond...

#The error "ZeroDivisionError" is raised when you try to divide a number by zero in Python. Division by zero is not defined in mathematics, hence this error is generated to indicate an invalid operation.
#To fix this error, you need to make sure you do not divide a number by zero. If the denominator can potentially be zero in your code, you can add a check to handle this scenario using an if condition. For example:

#try:
#    result = 0/0
#except ZeroDivisionError:
#    print("Cannot divide by zero")

#In this case, if the division operation encounters a ZeroDivisionError, it will be caught by the except block, which will then print the error message.

Metadata

Release files for gooderror 0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gooderror 0.0.3
File Size Uploaded Provenance Actions
gooderror-0.0.3.tar.gz 3.7 kB Without provenance Details for gooderror-0.0.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for gooderror 0.0.3
File Interpreter ABI Platform Actions
gooderror-0.0.3-py3-none-any.whl Python 3 none any Details for gooderror-0.0.3-py3-none-any.whl

Total release size: 7.1 kB

Release files / gooderror-0.0.3.tar.gz

Download URL gooderror-0.0.3.tar.gz
Size 3.7 kB
Tags Source
SHA-256 checksum
How to use checksums
21d4c1b12cf4c5f9db741ca894b52790b901341783df49b92213a894e2dea1e7
BLAKE2b-256 checksum
How to use checksums
7b968a4c15cf5244efc22f341faa755f714ab18bb46f44c09e90e08e6490a5bd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.5

Release files / gooderror-0.0.3-py3-none-any.whl

Download URL gooderror-0.0.3-py3-none-any.whl
Size 3.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ba47e5abd2d7066ad3654a0b2721c1f2bd71151155c8490ef8ca22dae2d6c83e
BLAKE2b-256 checksum
How to use checksums
9b464b9dad3247fc9520a775ba7e0d9d651b48fb3842bd39f9c2c3b3d90b083f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.5

Security for gooderror 0.0.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page