Skip to main content

errinshort

Error too long? Here's the short version.

Your code crashes. Python gives you 50 lines. Your ADHD mind open Instagram.

errinshort adds a tiny card at the end: what broke, why, and how to fix it. Read it in 5 seconds.

Install

pip install errinshort

Use

Add one line at the top of your script:

import errinshort

That's it.

What you get

KeyError: 'missing'

╭─ KeyError ─────────────────────────────────────
│
│   o━━┳┳   x   { ... }
│
│   That key? Never heard of her.
│
│   The dictionary doesn't have this key.
│   → Use my_dict.get("key") to get None instead
│     of a crash.
╰────────────────────────────────────────────────
  • 🎨 a tiny drawing
  • 😂 a funny line
  • 🧠 what it means, in one line
  • 🔧 how to fix it

The full error is still there above the card, in case you need it.

Try the cards

errinshort              # list all 66 errors
errinshort KeyError     # see one card
errinshort all          # see every card

Good to know

  • Works for all 66 built-in Python errors.
  • Errors from other libraries get the card of the closest built-in error.
  • Soft colors. Turn them off with NO_COLOR=1.
  • No extra packages needed.

License

MIT

Metadata

Release files for errinshort 0.1.0

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

Source distribution (sdist)

Source distribution for errinshort 0.1.0
File Size Uploaded Provenance
errinshort-0.1.0.tar.gz 10.8 kB Without provenance Details

Built distribution (wheel)

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

Total release size: 22.6 kB

Release files / errinshort-0.1.0.tar.gz

Download URL errinshort-0.1.0.tar.gz
Size 10.8 kB
Tags Source
SHA-256 checksum
How to use checksums
2f08e172ee27a024b289950d3d04666dfa90dba9ae535d865d1860c6b6909560
BLAKE2b-256 checksum
How to use checksums
9210b002285a79860458dffbf8bed590e0615540361fd93d8a56ffd0d814910f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.8

Release files / errinshort-0.1.0-py3-none-any.whl

Download URL errinshort-0.1.0-py3-none-any.whl
Size 11.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7fe6a506c844754df9b5600c7cbc6d3856338acef26d7b88d51f01877716de0d
BLAKE2b-256 checksum
How to use checksums
cea69f5831a38f85006ccf0d722318e917ab77fa41ad32841425640273371f41
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.8

Security for errinshort 0.1.0

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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

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