Observed since 21 Oct, 10:25 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
AI-powered Python debugger that explains errors in plain English with practical fixes
An AI-powered Python debugger that explains errors in plain English with suggested fixes.
Stop wasting time deciphering cryptic error messages! AI-DBUG translates Python errors into clear, understandable explanations with practical solutions.
| Platform | Emojis | Colors | Status |
|---|---|---|---|
| 🪟 Windows Terminal | ✅ | ✅ | ✅ Perfect |
| 🪟 Windows CMD/PowerShell | ASCII | ✅ | ✅ Good |
| 🖥️ VS Code | ✅ | ✅ | ✅ Perfect |
| 🍎 macOS Terminal | ✅ | ✅ | ✅ Perfect |
| 🐧 Linux Terminal | ✅ | ✅ | ✅ Perfect |
| 💻 PyCharm | ✅ | ✅ | ✅ Perfect |
| 📓 Jupyter | ✅ | ✅ | ✅ Perfect |
pip install ai-dbug
For colored output (recommended):
pip install ai-dbug[color]
For all features:
pip install ai-dbug[full]
import ai_dbug
# Enable AI debugging - that's it!
ai_dbug.enable_ai_debugging()
# Your code here
result = 5 + "10" # TypeError with helpful explanation!
======================================================================
🐛 AI-DBUG: Error Analysis
======================================================================
❌ Error
TypeError: can only concatenate str (not "int") to str
📍 Location
File: example.py, Line: 7, Function: <module>
Code: result = 5 + "10"
💡 What Happened?
You're trying to perform an operation between incompatible types
(e.g., adding a number and a string).
🔧 How to Fix
Convert one type to match the other. For example:
str(number) + string or int(string) + number.
📝 Example
age = 25
print('Age: ' + str(age)) # Convert int to str
# or
result = int('10') + 5 # Convert str to int
import ai_dbug
ai_dbug.enable_ai_debugging()
# All errors in your script will be explained
data = {'name': 'Alice'}
print(data['age']) # KeyError with AI explanation
from ai_dbug import debug_context
# Only debug specific code blocks
with debug_context():
result = 10 / 0 # ZeroDivisionError with explanation
from ai_dbug import debug_multiple
# Catch and explain multiple errors without stopping
with debug_multiple() as handler:
with handler:
x = 5 + "10" # Error 1
with handler:
data['missing'] # Error 2
with handler:
10 / 0 # Error 3
# Output: "3 errors caught and explained"
from ai_dbug import ErrorAnalyzer, ErrorFormatter
import sys
analyzer = ErrorAnalyzer()
formatter = ErrorFormatter()
try:
problematic_code()
except Exception:
exc_type, exc_value, exc_tb = sys.exc_info()
analysis = analyzer.analyze_exception(exc_type, exc_value, exc_tb)
formatter.format_error(analysis)
import ai_dbug
# Show only AI-DBUG output (cleaner!)
ai_dbug.enable_ai_debugging(
use_color=True,
show_original_traceback=False # Default
)
# Maximum compatibility mode
ai_dbug.enable_ai_debugging(use_color=False)
import ai_dbug
ai_dbug.enable_ai_debugging()
# ... your code ...
ai_dbug.disable_ai_debugging()
AI-DBUG automatically adapts to your environment:
[!] [X] [@] [?] [+] [~]# Install with dev dependencies
pip install ai-dbug[dev]
# Run tests
pytest tests/ -v
# Run with coverage
pytest tests/ --cov=ai_dbug --cov-report=html
# View coverage report
open htmlcov/index.html
Before AI-DBUG:
TypeError: unsupported operand type(s) for +: 'int' and 'str'
😕 What does this mean?
With AI-DBUG:
💡 What Happened?
You're trying to add a number and text together. Python doesn't know
if you want math (5 + 10) or joining text ("5" + "10").
🔧 How to Fix
Convert both to the same type:
- For math: int("10") + 5 = 15
- For text: str(5) + "10" = "510"
😊 Clear and helpful!
Before AI-DBUG:
KeyError: 'phone'
With AI-DBUG:
💡 What Happened?
You're trying to access a dictionary key 'phone' that doesn't exist.
🔧 How to Fix
1. Check if key exists first:
if 'phone' in user_data:
phone = user_data['phone']
2. Use .get() with a default:
phone = user_data.get('phone', 'Not provided')
Before AI-DBUG:
FileNotFoundError: [Errno 2] No such file or directory: 'data.txt'
With AI-DBUG:
💡 What Happened?
Python can't find the file 'data.txt'. It's looking in:
/home/user/project/
🔧 How to Fix
1. Check the file exists:
import os
if os.path.exists('data.txt'):
with open('data.txt') as f:
content = f.read()
2. Use absolute path:
filepath = '/full/path/to/data.txt'
3. Check current directory:
print(os.getcwd())
sudo apt install fonts-noto-color-emojiai-dbug/
├── ai_dbug/
│ ├── __init__.py # Package exports
│ ├── core.py # Main debugger
│ ├── knowledge_base.py # 70+ error explanations
│ ├── formatter.py # Cross-platform output
│ └── analyzer.py # Error analysis
├── tests/
│ ├── __init__.py
│ └── test_ai_dbug.py # Test suite
├── README.md # This file
├── LICENSE # MIT License
├── pyproject.toml # Package config
├── setup.py # Setup script
└── .gitignore # Git ignore rules
We love contributions! Here's how you can help:
ai_dbug/knowledge_base.pytests/test_ai_dbug.pyExample:
ERROR_KNOWLEDGE_BASE = {
"YourError: pattern here": {
"explanation": "Clear explanation in plain English",
"fix": "Step-by-step solution",
"example": "# Working code example\ncode_here()"
}
}
Found a bug or have a suggestion? Open an issue
Documentation improvements are always welcome!
MIT License - see LICENSE file for details.
Perfect for:
Traceback (most recent call last):
File "script.py", line 42, in <module>
process_data(items)
File "script.py", line 15, in process_data
return [item.upper() for item in items]
File "script.py", line 15, in <listcomp>
return [item.upper() for item in items]
AttributeError: 'int' object has no attribute 'upper'
Spends 30 minutes debugging...
💡 What Happened?
You're trying to use .upper() on a number (int), but .upper()
only works on text (strings).
🔧 How to Fix
Convert to string first: str(item).upper()
Or check the type:
if isinstance(item, str):
item.upper()
📝 Example
items = [1, 2, "hello", 3]
result = [str(item).upper() for item in items]
# Output: ['1', '2', 'HELLO', '3']
Fixed in 30 seconds!
If AI-DBUG made debugging easier for you:
If you use AI-DBUG in research or education, please cite:
@software{ai_dbug,
title = {AI-DBUG: AI-Powered Python Debugger},
author = {AI-DBUG Contributors},
year = {2024},
url = {https://github.com/jithubaiju55/ai-dbug}
}
⭐ Star us on GitHub — it motivates us a lot!
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 0.1.0 | 2 Oct 2025 | 9 |
This describes our collected data; it is not a security assessment.
Observed since 21 Oct, 10:25 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:e9c1c88572ebbd3e596aee75c55f73a47ebae0191f7b90b44b08b19d14d6776a