Skip to main content

A lightweight developer utility that plays professional/chaotic sound effects on Python exceptions.

Project description

🚨 suserror

PyPI version License: MIT Python Versions

suserror is a lightweight, fun developer utility that turns your Python exceptions into an auditory experience. Whether you want a subtle alert or total chaos, suserror ensures you hear your mistakes.


✨ Features

  • 🎧 Instant Feedback: Plays a random sound whenever an exception goes uncaught.
  • Non-blocking: Sound playback happens in a daemon thread; your program won't freeze.
  • 🎭 Sound Modes: Choose between subtle for a quick heads-up or chaotic for maximum impact.
  • 🛠️ Customizable: Drop your own .mp3 files into the sounds/ folder to personalize your errors.
  • 🐍 Universal: Works seamlessly with any Python 3.8+ project.

🚀 Installation

For the best experience, install suserror in a virtual environment:

# Create a virtual environment
python3 -m venv venv
source venv/bin/activate

# Install suserror
pip install .

Note: Depends on pygame for high-quality audio handling.


📖 Usage

🧙‍♂️ Automatic Mode (The "Set and Forget")

Just one line at the top of your script, and you're good to go. All uncaught exceptions will trigger a random sound.

import suserror

# Start the auto-hook (default mode is 'all')
suserror.auto()

# Any error below will trigger a sound
1 / 0 

🎭 Switching Modes

You can control the vibe of your errors by passing a mode to auto().

# For a more professional/minimalist feel
suserror.auto(mode="subtle")

# For when you really messed up
suserror.auto(mode="chaotic")

🕹️ Manual Mode

Trigger a sound effect programmatically whenever you want.

import suserror

try:
    process_sensitive_data()
except DataError:
    suserror.play_error(mode="chaotic")
    # Log the error or handle it

📂 Sound Categories

The package comes with several pre-bundled sounds categorized as follows:

  • Subtle: Minimalist pings and short alerts (e.g., anime-ahh.mp3).
  • Chaotic: Longer, louder, or more "sus" sounds (e.g., among-us-role-reveal-sound.mp3, fahhhhhhhhhhhhhh.mp3).

🛠️ Development & Customization

To add your own sound effects:

  1. Navigate to the suserror/sounds/ directory.
  2. Drop your .mp3 files there.
  3. (Optional) Update SOUND_MODES in player.py to categorize them.

📜 License

Distributed under the MIT License. See LICENSE for more information.


Made with ❤️ for the Python community

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

suserror-0.2.1.tar.gz (607.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

suserror-0.2.1-py3-none-any.whl (605.7 kB view details)

Uploaded Python 3

File details

Details for the file suserror-0.2.1.tar.gz.

File metadata

  • Download URL: suserror-0.2.1.tar.gz
  • Upload date:
  • Size: 607.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for suserror-0.2.1.tar.gz
Algorithm Hash digest
SHA256 b5ccb718e87be83b04c3d703feebffdf3bebc772692c94046bdc44ebd68799d0
MD5 2c7d8752d05931c92db60080ca473f56
BLAKE2b-256 eccd681ddf2e49820f9c477a4c895d51c89615f1840eb52420b81242c588f92d

See more details on using hashes here.

File details

Details for the file suserror-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: suserror-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 605.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for suserror-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f4c2da6046f8c2fb339b476230684880f6954546510ed21efb0524c8689e6600
MD5 e37a471934b8ebf15c86d4e767a0a2ac
BLAKE2b-256 4cb0bf8260de32ce0f5ac4c51d854e602d3837926899b92600795e8c25778820

See more details on using hashes here.

Supported by

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