Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

run.py: Python solutions are skipped on Windows when run via python instead of python3

Offen
#29 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

@tanujb03 arbeitet bereits daran.

Seit 10.10.2026.

  • #32 von @tanujb03 — offen

Bewertung

Schwierigkeit
1/5
Geschätzter Aufwand
Unter einer Stunde
Anfängerfreundlichkeit
15/100
Issue-Typ
Bug
Klarheit
Klar beschrieben
Aktivitätsstatus
Veraltet
Tech-Stack
python
Bereich
tooling

Rechercherichtung

The bug is in run.py, where LANGUAGES[".py"] hardcodes "python3" as the interpreter, so Python solutions are skipped on Windows when only python exists. Check whether the runner can use sys.executable for the .py entry instead, then run python run.py --lang py on Windows and confirm the six solution.py and solution_naive.py files execute and are checked against cases.txt. Pull request #32 already targets this, so review it before starting new work.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

bug good first issue

What I did

  1. Fresh checkout of main on Windows 11 with Python installed via the standard python.org Windows installer (providing python.exe on PATH, with no python3.exe symlink/binary).
  2. Run the solution check using the command specified in the README:
python run.py --lang py

What I expected
The README section "Running the checks" says:

"It needs Python 3. On Windows the command is python. Solutions in languages you don't have installed are skipped."

Because Python 3 is installed and running run.py, the 6 Python solutions (solution.py across problems) should be executed and checked against cases.txt.

What happened instead
Every Python solution is skipped because run.py looks specifically for python3:

anagram
binary-search
  skip  solution.py (python3 isn't installed)
fibonacci
  skip  solution.py (python3 isn't installed)
  skip  solution_naive.py (python3 isn't installed)
palindrome
  skip  solution.py (python3 isn't installed)
prime
  skip  solution.py (python3 isn't installed)
roman-numerals
  skip  solution.py (python3 isn't installed)

Summary: 0 passed, 0 failed, 6 skipped

The runner exits 0, skipping all Python checks even though Python 3 is actively executing the runner. On Windows machines with Microsoft Store app aliases enabled, shutil.which('python3') resolves to the WindowsApps stub, which errors out with "Python was not found", causing every Python solution to fail spuriously.

In run.py, LANGUAGES[".py"] hardcodes "python3":

".py": ("python3", None, ["python3", "{src}"])

Instead, using sys.executable ensures the runner launches solutions with the same Python 3 interpreter currently executing run.py.

Environment
Windows 11, Python 3.14 (python.exe), code-corner main @ 0c95800.

I would like to work on this fix.

Vorherrschende Sprache
Python
Sterne
1
Forks
6
Ø Merge
17 Std. 52 Min.
Gemergte PRs (30 T.)
14

Entwicklungsumgebung

  • Kein Dockerfile und keine Docker-Compose-Datei
  • Hat eine Pull-Request-Vorlage
  • Kein Beitragsleitfaden

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus techcsispit/code-corner

Alle Issues in techcsispit/code-corner

Ähnliche Issues

Weitere Issues zu Python

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.