Skip to content

Troubleshooting

This guide helps you resolve common issues with the Blockly Python Executor.

Common Issues

Application Won't Start

Symptoms

  • Application doesn't launch when clicked
  • No error message appears
  • Process starts but immediately exits

Solutions

Check System Requirements - Ensure you have at least 4 GB RAM - Verify 500 MB free disk space - Check if your OS is supported (Windows 10+, macOS 10.14+, Ubuntu 18.04+)

Run as Administrator (Windows)

# Right-click the application and select "Run as administrator"

Check Antivirus Software - Some antivirus programs block Electron applications - Add the application to your antivirus whitelist - Temporarily disable real-time protection to test

Clear Application Data

# Windows
%APPDATA%\blockly-python-executor

# macOS
~/Library/Application Support/blockly-python-executor

# Linux
~/.config/blockly-python-executor

Reinstall the Application 1. Uninstall the current version 2. Download the latest version 3. Install with administrator privileges

Python Code Won't Execute

Symptoms

  • Click "Run Code" but nothing happens
  • Terminal shows "Failed to reach backend"
  • Error messages about Python not found

Solutions

Check Backend Server 1. Click "Connect Server" button 2. Wait for "Connected" status 3. If it fails, restart the application

Verify Python Installation

# Check Python version
python --version
# Should be 3.8 or higher

# Check Python path
which python
# On Windows: where python

Check Python Packages

# Install required packages
pip install pmini_sdk_python

# Or let the application install them
npm run prepare-venv

Restart the Application 1. Close the application completely 2. Wait 5 seconds 3. Launch again 4. Try running code

Drone Connection Issues

Symptoms

  • "Connect Server" button doesn't work
  • Status shows "Disconnected" or "Server Running (No Drone)"
  • Telemetry window shows no data

Solutions

Check Drone Power - Ensure the drone is powered on - Check battery level (should be above 20%) - Verify LED indicators are active

Verify Network Connection

# Test network connectivity
ping localhost
# Should return responses

# Check if port 50051 is accessible
telnet localhost 50051
# Should connect successfully

Check Firewall Settings - Ensure port 50051 is not blocked - Add the application to firewall exceptions - Temporarily disable firewall to test

Restart Drone Server 1. Click "Disconnect Server" 2. Wait 5 seconds 3. Click "Connect Server" again 4. Wait for "Connected" status

Check Drone Server Logs - Look in the terminal for error messages - Check if pmini_server is running - Verify Python virtual environment is active

Block Issues

Symptoms

  • Blocks won't connect to each other
  • Blocks disappear when dragged
  • Error messages about missing blocks

Solutions

Check Block Compatibility - Some blocks only connect to specific types - Look for matching shapes (squares, circles, etc.) - Check the block documentation

Refresh the Workspace 1. Click "Clear Blocks" button 2. Try dragging blocks again 3. If problem persists, restart the application

Check Block Definitions - Ensure all block files are present - Verify block definitions are correct - Check for syntax errors in block files

Update the Application - Download the latest version - Check for bug fixes in release notes - Report persistent issues to the project

Performance Issues

Symptoms

  • Application runs slowly
  • Blocks are slow to respond
  • Terminal output is delayed

Solutions

Check System Resources - Close other applications - Ensure sufficient RAM (8 GB recommended) - Check CPU usage

Reduce Workspace Complexity - Break large programs into smaller parts - Use functions to organize code - Remove unused blocks

Clear Terminal Output 1. Click in the terminal 2. Press Ctrl+A (Cmd+A on macOS) 3. Press Delete to clear

Restart the Application - Close and reopen the application - This clears memory and resets state

Build Issues

Symptoms

  • npm run build fails
  • Dependencies won't install
  • Build errors with webpack

Solutions

Update Node.js

# Check Node.js version
node --version
# Should be 16.0.0 or higher

# Update Node.js
# Download from https://nodejs.org/

Clear npm Cache

npm cache clean --force

Delete node_modules

rm -rf node_modules
npm install

Check Package Versions

# Check for outdated packages
npm outdated

# Update packages
npm update

Verify Python Environment

# Check Python version
python --version

# Install Python packages
pip install -r requirements-pmini.txt

Error Messages

"Failed to reach backend"

Cause: Backend server is not running Solution: Click "Connect Server" button

"Python not found"

Cause: Python is not installed or not in PATH Solution: Install Python 3.8+ and add to PATH

"Module not found: pmini_sdk_python"

Cause: Required Python package is not installed Solution: Run npm run prepare-venv or pip install pmini_sdk_python

"Connection refused"

Cause: Drone server is not running Solution: Check drone power and network connection

"Permission denied"

Cause: Insufficient permissions Solution: Run as administrator (Windows) or with sudo (Linux)

"Port 50051 already in use"

Cause: Another instance is using the port Solution: Close other instances or restart the application

Debugging Steps

1. Check Application Logs

Look for error messages in: - Terminal output - Application console - System logs

2. Verify System Requirements

  • Operating system version
  • Available memory
  • Disk space
  • Network connectivity

3. Test Basic Functionality

  1. Launch application
  2. Create simple program (print "Hello")
  3. Run code
  4. Check terminal output

4. Test Drone Connection

  1. Click "Connect Server"
  2. Wait for "Connected" status
  3. Try simple drone command
  4. Check telemetry data

5. Check Generated Code

  1. Look at the code pane
  2. Verify Python syntax
  3. Check for missing imports
  4. Test code manually

Getting Help

Check Documentation

Search Existing Issues

  • Check GitLab Issues
  • Search for similar problems
  • Check if there's a known solution

Create a New Issue

When reporting a problem, include: 1. System information: - Operating system and version - Application version - Python version - Node.js version

  1. Problem description:
  2. What you were trying to do
  3. What happened instead
  4. Error messages (if any)

  5. Steps to reproduce:

  6. Detailed steps to recreate the problem
  7. Screenshots or videos (if helpful)

  8. Log files:

  9. Application logs
  10. Terminal output
  11. System logs

Join Discussions

Prevention

Regular Maintenance

  • Keep the application updated
  • Update Python packages regularly
  • Clear temporary files periodically
  • Restart the application occasionally

Best Practices

  • Start with simple programs
  • Test frequently during development
  • Use meaningful variable names
  • Add comments to complex code
  • Save your work regularly

System Health

  • Monitor available memory
  • Check disk space regularly
  • Keep system updated
  • Use antivirus software
  • Backup important projects

Recovery

If Application Won't Start

  1. Restart your computer
  2. Check system requirements
  3. Reinstall the application
  4. Contact support if problem persists

If Data is Lost

  1. Check for backup files
  2. Look in the application data directory
  3. Check if workspace was saved
  4. Recreate the program if necessary

If Drone is Unresponsive

  1. Power cycle the drone
  2. Check battery level
  3. Verify network connection
  4. Restart the application
  5. Try a simple command first

Remember: Most issues can be resolved by restarting the application or checking the basic requirements. If you're still having problems, don't hesitate to ask for help!