Skip to content

Add error message when Python is not installed #449

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented May 27, 2025

Problem

When users try to run Python files using the run button but don't have Python installed on their system, nothing happens - the run button silently fails with no feedback to the user.

Solution

Added proper error handling when Python executable is not found:

  1. Created a utility function to check if an executable exists in the system PATH
  2. Added error handling in both terminal and background execution code paths
  3. Show a clear error message when Python is not found with an "Install Python" button

Testing

Verified that:

  • When Python is installed, the run functionality continues to work as before
  • When Python is not installed, a clear error message is shown instead of silently failing

Screenshots

When Python is not found, the user now sees:
Python not found error message

Fixes #391.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@Copilot Copilot AI changed the title [WIP] Run button does nothing when Python is not installed Add error message when Python is not installed May 27, 2025
@Copilot Copilot AI requested a review from eleanorjboyd May 27, 2025 15:40
Copilot finished work on behalf of eleanorjboyd May 27, 2025 15:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Run button does nothing when Python is not installed
2 participants