Troubleshooting Guide

Back to Documentation Hub

Troubleshooting Guide

Bravura - Military-Grade Edition

Solutions for common issues, error messages, and technical problems

---

๐ŸŽฏ Quick Diagnostic

First Steps - Verify Your Setup

  1. Check Python Version

```bash

python --version

# Should show Python 3.7.0 or higher

```

  1. Verify tkinter Installation

```python

import tkinter as tk

print("tkinter is available!")

```

  1. Test Basic Installation

```bash

cd "Bravura"

python quick_test.py

```

  1. Run Comprehensive Validation

```bash

python final_validation.py

# Should show 6/6 tests passed

```

If any of these fail, see the specific sections below.

---

๐Ÿšจ Installation Issues

Error: "No module named 'gui_main'"

Symptoms:

Solutions:

  1. Check Working Directory

```bash

ls -la # Linux/macOS

dir # Windows

# Should see gui_main.py in the current directory

```

  1. Navigate to Correct Folder

```bash

cd "Bravura"

python demo_commercial.py

```

  1. Fix Python Path (if needed)

```python

import sys

sys.path.insert(0, "/path/to/Bravura")

from bravura import get_audio_analyzer_framework

Get framework class and create instance

AppClass = get_audio_analyzer_framework()

app = AppClass()

```

Error: "No module named 'tkinter'"

Symptoms:

Solutions:

Ubuntu/Debian:


sudo apt-get update
sudo apt-get install python3-tk

CentOS/RHEL/Fedora:


sudo yum install tkinter
# OR for newer versions:
sudo dnf install python3-tkinter

macOS (if using Homebrew Python):


brew install python-tk

Windows:

Error: Permission Denied

Symptoms:

Solutions:

  1. Check File Permissions

```bash

chmod +x quick_test.py # Linux/macOS

```

  1. Run as Administrator (Windows)

- Right-click Command Prompt

- Choose "Run as administrator"

  1. Check Antivirus Software

- Temporarily disable real-time protection

- Add toolkit folder to antivirus exclusions

---

๐Ÿ–ฅ๏ธ Display & UI Issues

Window Appears Too Small

Symptoms:

Solutions:

  1. Check Display Scaling

```python

# Add to your app initialization

try:

from ctypes import windll

windll.shcore.SetProcessDpiAwareness(1)

except:

pass

```

  1. Manually Set Window Size

```python

app = AnalysisGUIFramework()

app.root.geometry("1200x800") # Width x Height

app.run()

```

  1. Adjust tkinter Scaling

```python

app.root.tk.call('tk', 'scaling', 2.0) # 2x scaling

```

  1. Windows-Specific DPI Fix

- Right-click Python.exe

- Properties โ†’ Compatibility

- Check "Override high DPI scaling behavior"

- Set to "Application"

Themes Don't Apply Correctly

Symptoms:

Solutions:

  1. Reset Configuration

```bash

# Delete config file to reset

rm gui_config.json # Linux/macOS

del gui_config.json # Windows

# Then restart the application

```

  1. Force Theme Application

```python

app.theme_manager.apply_theme("dark")

app.root.update_idletasks()

```

  1. Check for Custom Styling Conflicts

```python

# Remove any custom tkinter styling that might interfere

# Avoid using .configure() directly on themed widgets

```

Progress Bar Not Smooth

Symptoms:

Solutions:

  1. Install pygame for Better Animation

```bash

pip install pygame

```

  1. Adjust Animation Speed

```python

app.glowing_progress_bar.set_animation_speed(1.0) # Normal speed

```

  1. Enable Rainbow Mode

```python

app.glowing_progress_bar.enable_rainbow_mode()

```

  1. Check System Performance

- Close other applications

- Check CPU/GPU usage

- Ensure adequate system resources

---

๐Ÿ”ง GPU Detection Issues

GPU Not Detected

Symptoms:

Solutions:

  1. Install GPU Detection Dependencies

```bash

# For NVIDIA GPUs

pip install GPUtil

# For system monitoring

pip install psutil

```

  1. Run GPU Diagnostic

```bash

python validate_gpu.py

# Check output for specific issues

```

  1. Manual GPU Detection Test

```python

from gpu_utils import detect_gpus

result = detect_gpus()

print(f"Detection result: {result}")

```

  1. Platform-Specific Solutions

Windows:

```bash

# Test WMIC access

wmic path win32_VideoController get Name

```

Linux:

```bash

# Test lspci access

lspci | grep -i vga

lspci | grep -i display

```

macOS:

```bash

# Test system_profiler access

system_profiler SPDisplaysDataType

```

NVIDIA GPU Not Recognized

Symptoms:

Solutions:

  1. Install NVIDIA Drivers

- Download from nvidia.com

- Install latest drivers for your card

- Restart system after installation

  1. Install GPUtil

```bash

pip install GPUtil

```

  1. Test NVIDIA-SMI

```bash

nvidia-smi

# Should show GPU information

```

  1. Check CUDA Installation

```bash

nvcc --version

# If not found, CUDA toolkit may be needed

```

---

โšก Performance Issues

Slow Application Startup

Symptoms:

Solutions:

  1. Disable Startup GPU Detection

```python

# Modify gui_config.json

{

"gpu": {

"auto_detect": false

}

}

```

  1. Use Loading Screen

```python

app = AnalysisGUIFramework(show_loading=True)

```

  1. Optimize Theme Loading

```python

# Set a specific theme instead of auto-detection

app.theme_manager.apply_theme("dark")

```

High Memory Usage

Symptoms:

Solutions:

  1. Check Log Buffer Settings

```python

# Reduce log buffer size if needed

app.logger = TkTextRingLogger(app.log_text, max_chars=10000)

```

  1. Monitor Memory Usage

```python

import psutil

process = psutil.Process()

print(f"Memory usage: {process.memory_info().rss / 1024 / 1024:.1f} MB")

```

  1. Clear Log Periodically

```python

app.log_text.delete(1.0, "end")

```

UI Freezing During Operations

Symptoms:

Solutions:

  1. Use Worker Thread System

```python

def my_task(emit, cancel):

for i in range(100):

if cancel.is_set():

return

# Do work here

emit("PROGRESS", percent=i)

app.worker.run(my_task, on_message=app._on_worker_message)

```

  1. Check for UI Thread Blocking

```python

# Avoid long operations on main thread

# Use time.sleep() in worker threads only

```

  1. Ensure Proper Message Handling

```python

# Messages should be handled quickly

def _on_worker_message(self, msg):

# Quick UI updates only

if msg.kind == "PROGRESS":

self._update_progress_with_eta(msg.payload["percent"])

```

---

๐Ÿ—‚๏ธ File & Configuration Issues

Configuration File Errors

Symptoms:

Solutions:

  1. Reset Configuration

```bash

# Backup and delete config file

cp gui_config.json gui_config.json.backup

rm gui_config.json

# Application will create new default config

```

  1. Validate JSON Syntax

```python

import json

with open("gui_config.json", "r") as f:

try:

config = json.load(f)

print("Configuration is valid")

except json.JSONDecodeError as e:

print(f"JSON error: {e}")

```

  1. Manual Configuration Fix

```json

{

"theme": {

"default_theme": "dark"

},

"window": {

"stay_on_top": false

},

"progress": {

"rainbow_mode": true,

"animation_speed": 1.0

},

"gpu": {

"auto_detect": true

}

}

```

File Permission Errors

Symptoms:

Solutions:

  1. Check Directory Permissions

```bash

ls -la gui_config.json # Check permissions

chmod 644 gui_config.json # Fix if needed

```

  1. Run with Appropriate Permissions

```bash

# Ensure user has write access to toolkit directory

```

  1. Use Alternative Config Location

```python

# Modify config path if needed

config_path = os.path.expanduser("~/analysis_gui_config.json")

```

---

๐Ÿงต Threading & Concurrency Issues

"Job Already Running" Error

Symptoms:

Solutions:

  1. Check Worker Status

```python

print(f"Worker running: {app.worker.is_running()}")

```

  1. Force Cancel Current Job

```python

app.worker.cancel()

time.sleep(0.1) # Brief delay

# Then start new job

```

  1. Reset Worker System

```python

app.worker = Worker(app.root)

```

Thread Safety Violations

Symptoms:

Solutions:

  1. Use Message Queue System

```python

# Always use emit() from worker threads

def my_job(emit, cancel):

emit("LOG", text="Message from worker") # Correct

# app._log_message("Direct call") # Wrong!

```

  1. Schedule UI Updates Properly

```python

# Use root.after() for delayed UI updates

app.root.after(100, lambda: app.status_var.set("Updated"))

```

  1. Validate Thread Safety

```bash

python validate_wiring.py

# Should show "Thread Safety: PASS"

```

---

๐Ÿ” Debugging & Diagnostics

Enable Debug Logging

Add debug logging to track down issues:


import logging
logging.basicConfig(level=logging.DEBUG)

app = AnalysisGUIFramework()
app._log_message("Debug logging enabled")
app.run()

Run Complete Validation

For comprehensive system check:


python final_validation.py

Expected output:


๐ŸŽฏ Overall: 6/6 tests passed
๐ŸŽ‰ MILITARY-GRADE VALIDATION SUCCESSFUL!

Check System Information


import platform
import sys

print(f"Python: {sys.version}")
print(f"Platform: {platform.platform()}")
print(f"Architecture: {platform.architecture()}")

Memory and Performance Profiling


import psutil
import time

def profile_memory():
    process = psutil.Process()
    memory_mb = process.memory_info().rss / 1024 / 1024
    print(f"Memory usage: {memory_mb:.1f} MB")

# Call periodically to monitor

---

๐Ÿ“ž Getting Additional Help

When to Contact Support

Contact support if you experience:

Information to Include

When contacting support, please provide:

  1. System Information

```bash

python --version

python -c "import platform; print(platform.platform())"

```

  1. Toolkit Version

```bash

cat VERSION.txt # Linux/macOS

type VERSION.txt # Windows

```

  1. Error Messages

- Complete error text

- Stack traces if available

- Steps to reproduce

  1. Configuration

```bash

cat gui_config.json # Linux/macOS

type gui_config.json # Windows

```

Support Channels

Emergency Support

For critical production issues (Enterprise customers):

---

๐Ÿ”„ Recovery Procedures

Complete Reset

If all else fails, perform a complete reset:

  1. Backup Custom Code

```bash

cp my_custom_app.py my_custom_app.py.backup

```

  1. Clean Installation

```bash

rm gui_config.json

rm -rf __pycache__ # Linux/macOS

rmdir /s __pycache__ # Windows

```

  1. Verify Clean State

```bash

python quick_test.py

```

  1. Restore Custom Code

```bash

cp my_custom_app.py.backup my_custom_app.py

```

Configuration Recovery

If configuration becomes corrupted:


# Create minimal working config
import json

config = {
    "theme": {"default_theme": "dark"},
    "window": {"stay_on_top": False},
    "progress": {"rainbow_mode": True, "animation_speed": 1.0},
    "gpu": {"auto_detect": True}
}

with open("gui_config.json", "w") as f:
    json.dump(config, f, indent=2)

---

Last Updated: September 12, 2025

Version: 2.0.0 Military-Grade Edition

Next Review: October 12, 2025

This troubleshooting guide is continuously updated based on user reports and common issues. Report new problems to support@wigleystudios.com