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)
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 buildfails- 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
Delete node_modules
Check Package Versions
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
- Launch application
- Create simple program (print "Hello")
- Run code
- Check terminal output
4. Test Drone Connection
- Click "Connect Server"
- Wait for "Connected" status
- Try simple drone command
- Check telemetry data
5. Check Generated Code
- Look at the code pane
- Verify Python syntax
- Check for missing imports
- Test code manually
Getting Help
Check Documentation
- Read the User Guide
- Check the Block Reference
- Look at Examples
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
- Problem description:
- What you were trying to do
- What happened instead
-
Error messages (if any)
-
Steps to reproduce:
- Detailed steps to recreate the problem
-
Screenshots or videos (if helpful)
-
Log files:
- Application logs
- Terminal output
- System logs
Join Discussions
- Community Discussions
- Ask questions
- Share solutions
- Get help from other users
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
- Restart your computer
- Check system requirements
- Reinstall the application
- Contact support if problem persists
If Data is Lost
- Check for backup files
- Look in the application data directory
- Check if workspace was saved
- Recreate the program if necessary
If Drone is Unresponsive
- Power cycle the drone
- Check battery level
- Verify network connection
- Restart the application
- 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!