Skip to content

Latest commit

 

History

History
635 lines (471 loc) · 13.8 KB

File metadata and controls

635 lines (471 loc) · 13.8 KB

🔧 Troubleshooting Guide - Pandas-TA GUI Suite

Complete solutions for common issues

This guide provides solutions for the most common problems users encounter when installing and using the Pandas-TA GUI Suite.

📋 Quick Problem Index

Installation Issues:

Application Issues:

Mobile Demo Issues:

Data Issues:


🔧 Installation Issues

Python not recognized

Problem: "Python is not recognized as an internal or external command"

Cause: Python is not installed or not added to system PATH

Solutions:

  1. Reinstall Python with PATH option:

    • Download Python from python.org
    • IMPORTANT: Check "Add Python to PATH" during installation
    • Restart your terminal/command prompt
  2. Manually add Python to PATH (Windows):

    1. Open System Properties (Win + Pause)
    2. Click "Advanced system settings"
    3. Click "Environment Variables"
    4. Find "Path" in System variables
    5. Add Python installation directory (e.g., C:\Python311\)
    6. Add Scripts directory (e.g., C:\Python311\Scripts\)
    7. Restart terminal
    
  3. Use full Python path:

    # Instead of: python pandas_ta_gui.py
    # Use full path:
    C:\Python311\python.exe pandas_ta_gui.py
  4. Verify installation:

    python --version
    # Should show: Python 3.x.x

pip not recognized

Problem: "'pip' is not recognized as an internal or external command"

Solutions:

  1. Use python -m pip:

    python -m pip install -r requirements.txt
  2. Reinstall pip:

    python -m ensurepip --upgrade
  3. Install pip manually:

    • Download get-pip.py from pip.pypa.io
    • Run: python get-pip.py

Permission denied errors

Problem: "Permission denied" or "Access is denied" during installation

Solutions:

  1. Use --user flag:

    pip install --user -r requirements.txt
  2. Run as administrator (Windows):

    • Right-click Command Prompt
    • Select "Run as administrator"
    • Run installation commands
  3. Use sudo (Mac/Linux):

    sudo pip3 install -r requirements.txt
  4. Use virtual environment:

    python -m venv pandas_ta_env
    # Windows:
    pandas_ta_env\Scripts\activate
    # Mac/Linux:
    source pandas_ta_env/bin/activate
    pip install -r requirements.txt

Package installation fails

Problem: Specific packages fail to install

Solutions:

  1. Update pip first:

    python -m pip install --upgrade pip
  2. Install packages individually:

    pip install pandas
    pip install numpy
    pip install pandas-ta
    pip install matplotlib
    pip install streamlit
    pip install plotly
    pip install yfinance
    pip install qrcode[pil]
  3. Use conda instead:

    conda install pandas numpy matplotlib
    pip install pandas-ta streamlit plotly yfinance qrcode[pil]
  4. Clear pip cache:

    pip cache purge
    pip install -r requirements.txt

tkinter not found

Problem: "No module named 'tkinter'"

Solutions:

  1. Ubuntu/Debian:

    sudo apt-get install python3-tk
  2. CentOS/RHEL:

    sudo yum install tkinter
    # or
    sudo dnf install python3-tkinter
  3. macOS (if missing):

    brew install python-tk
  4. Windows: Usually included with Python, try reinstalling Python


🖥️ Application Issues

Application won't start

Problem: Desktop GUI fails to launch

Diagnostic Steps:

  1. Check Python version:

    python --version
    # Needs Python 3.8 or higher
  2. Test imports:

    python -c "import tkinter; print('tkinter OK')"
    python -c "import pandas; print('pandas OK')"
    python -c "import pandas_ta; print('pandas_ta OK')"
    python -c "import matplotlib; print('matplotlib OK')"
  3. Run with verbose output:

    python -v pandas_ta_gui.py

Solutions:

  1. Update all packages:

    pip install --upgrade -r requirements.txt
  2. Try different matplotlib backend:

    # Set environment variable
    export MPLBACKEND=TkAgg  # Linux/Mac
    set MPLBACKEND=TkAgg     # Windows
    python pandas_ta_gui.py
  3. Check display settings (Linux):

    echo $DISPLAY
    # Should show something like :0.0
    # If empty, try: export DISPLAY=:0.0

Charts not displaying

Problem: Charts tab shows empty or broken charts

Solutions:

  1. Ensure data is loaded:

    • Generate sample data first
    • Check data preview shows actual data
  2. Calculate indicators first:

    • Go to Indicators tab
    • Select indicators
    • Click "Calculate Indicators"
    • Then generate charts
  3. Try different matplotlib backend:

    import matplotlib
    matplotlib.use('TkAgg')  # or 'Qt5Agg'
  4. Update matplotlib:

    pip install --upgrade matplotlib
  5. Check available backends:

    import matplotlib
    print(matplotlib.rcsetup.all_backends)

Application slow performance

Problem: GUI is slow or unresponsive

Solutions:

  1. Reduce data size:

    • Use fewer days (100 instead of 252)
    • Select fewer indicators
    • Clear unused charts
  2. Close other applications:

    • Free up RAM and CPU
    • Close unnecessary browser tabs
    • Stop background processes
  3. Restart application:

    • Close and reopen the GUI
    • Clear any cached data
  4. System requirements:

    • Ensure 4GB+ RAM available
    • Check CPU usage in Task Manager

Memory errors

Problem: "MemoryError" or application crashes

Solutions:

  1. Reduce dataset size:

    # Use fewer days
    days = 100  # instead of 252 or more
  2. Process indicators in batches:

    • Select 5-10 indicators at a time
    • Calculate in groups
    • Clear charts between batches
  3. Increase virtual memory (Windows):

    • System Properties → Advanced → Performance Settings
    • Advanced → Virtual Memory → Change
    • Set custom size (initial: 4096, maximum: 8192)
  4. Use 64-bit Python:

    python -c "import platform; print(platform.architecture())"
    # Should show ('64bit', ...)

Data loading fails

Problem: Cannot load stock data or CSV files

Solutions:

  1. Check internet connection:

    • Test with a web browser
    • Try ping google.com
  2. Verify stock symbols:

    • Use valid symbols (AAPL, MSFT, GOOGL)
    • Check symbol exists on Yahoo Finance
  3. Try alternative data source:

    • Use sample data instead
    • Download CSV manually and import
  4. Update yfinance:

    pip install --upgrade yfinance

📱 Mobile Demo Issues

QR code not generating

Problem: QR code doesn't appear or shows error

Solutions:

  1. Check qrcode installation:

    python -c "import qrcode; print('QR code OK')"
    python -c "from PIL import Image; print('PIL OK')"
  2. Reinstall qrcode with PIL:

    pip uninstall qrcode
    pip install "qrcode[pil]"
  3. Check network connectivity:

    • Ensure computer is connected to network
    • Try generating with localhost URL
  4. Manual QR generation test:

    import qrcode
    qr = qrcode.QRCode()
    qr.add_data("http://localhost:8510")
    qr.make()
    img = qr.make_image()
    img.save("test_qr.png")

Mobile demo not accessible

Problem: Cannot access web demo from mobile device

Solutions:

  1. Check firewall settings:

    • Allow Python through Windows Firewall
    • Disable antivirus web protection temporarily
  2. Verify network connection:

    • Ensure mobile and computer on same WiFi
    • Check computer's IP address: ipconfig (Windows) or ifconfig (Mac/Linux)
  3. Use localhost for testing:

    • Try http://localhost:8510 on same computer
    • Verify web demo works locally first
  4. Check port availability:

    # Windows
    netstat -an | findstr :8510
    # Mac/Linux  
    netstat -an | grep :8510
  5. Try different port:

    streamlit run web_demo.py --server.port 8511

Web server crashes

Problem: Streamlit server stops working

Solutions:

  1. Use stable launcher:

    python stable_web_launcher.py
  2. Check Python processes:

    # Windows
    tasklist | findstr python
    # Mac/Linux
    ps aux | grep python
  3. Kill existing processes:

    # Windows
    taskkill /f /im python.exe
    # Mac/Linux
    pkill -f streamlit
  4. Restart with fresh port:

    streamlit run web_demo.py --server.port 8512

Charts not loading on mobile

Problem: Mobile interface loads but charts don't appear

Solutions:

  1. Wait for processing:

    • Chart generation takes 10-30 seconds
    • Watch for "Generated X days of sample data" message
  2. Check mobile browser:

    • Use Chrome, Safari, or Firefox
    • Enable JavaScript
    • Clear browser cache
  3. Reduce data complexity:

    • Use fewer days (90 instead of 252)
    • Select fewer indicators (4 instead of 10+)
  4. Check network speed:

    • Ensure good WiFi connection
    • Try refreshing the page

📊 Data Issues

Stock symbols not found

Problem: "Symbol not found" or invalid ticker errors

Solutions:

  1. Verify symbol format:

    • Use uppercase (AAPL not aapl)
    • No spaces or special characters
    • Check symbol exists on Yahoo Finance
  2. Common valid symbols:

    Stocks: AAPL, MSFT, GOOGL, TSLA, AMZN, META
    ETFs: SPY, QQQ, VTI, IWM, TLT
    Indices: ^GSPC, ^DJI, ^IXIC, ^RUT
    
  3. Alternative symbols:

    • Different markets may need suffixes (.TO, .L)
    • Crypto symbols may not work reliably
  4. Use sample data instead:

    • Generate sample data for testing
    • Import actual CSV files

CSV import fails

Problem: Cannot load custom CSV files

Solutions:

  1. Check CSV format:

    Date,Open,High,Low,Close,Volume
    2023-01-01,100.0,102.0,99.0,101.0,1000000
    2023-01-02,101.0,103.0,100.0,102.0,1200000
  2. Required columns:

    • Date (or index)
    • Open, High, Low, Close (OHLC)
    • Volume (optional but recommended)
  3. Date format examples:

    2023-01-01
    01/01/2023
    2023-01-01 00:00:00
    Jan 1, 2023
    
  4. File encoding:

    • Save as UTF-8
    • Avoid special characters
    • Use comma separators

Indicator calculation errors

Problem: Indicators fail to calculate or show NaN values

Solutions:

  1. Check data quality:

    • Ensure no missing values
    • Verify data types are numeric
    • Check for duplicate dates
  2. Insufficient data:

    • Some indicators need minimum periods
    • RSI needs 14+ days
    • Moving averages need period+ days
  3. Data preprocessing:

    # Fill missing values
    df = df.fillna(method='ffill')
    
    # Ensure numeric types
    for col in ['Open', 'High', 'Low', 'Close', 'Volume']:
        df[col] = pd.to_numeric(df[col], errors='coerce')
  4. Try different parameters:

    • Use shorter periods for small datasets
    • Test with sample data first

🆘 Getting Additional Help

Before Asking for Help

  1. Check error messages carefully
  2. Try the solutions in this guide
  3. Test with sample data
  4. Update all packages
  5. Restart the application

When Reporting Issues

Include this information:

System Information:

# Operating System
python -c "import platform; print(platform.system(), platform.release())"

# Python Version
python --version

# Package Versions
pip list | grep -E "(pandas|numpy|matplotlib|streamlit|pandas-ta)"

Error Details:

  • Complete error message
  • Steps to reproduce
  • What you expected to happen
  • Screenshots if helpful

Community Resources

Professional Support

For business or educational use requiring dedicated support, contact us through the project repository for professional consulting services.


🎯 Prevention Tips

Regular Maintenance

  1. Keep Python updated:

    python -m pip install --upgrade pip
    pip install --upgrade -r requirements.txt
  2. Clear cache periodically:

    pip cache purge
  3. Backup working configurations:

    • Save analysis setups
    • Document working parameters
    • Keep installation notes

Best Practices

  • Test with sample data before important work
  • Start simple then add complexity
  • Save work frequently
  • Monitor system resources
  • Keep documentation handy

Remember: Most issues have simple solutions! Start with the basic troubleshooting steps before trying complex solutions.