run.py: Python solutions are skipped on Windows when run via python instead of python3
メンテナーはふだん 1 日以内に返信
評価
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
What I did
- Fresh checkout of
mainon Windows 11 with Python installed via the standard python.org Windows installer (providingpython.exeon PATH, with nopython3.exesymlink/binary). - 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.
- 主要言語
- Python
- スター
- 1
- フォーク
- 6
- 平均マージ
- 17時間 52分
- マージ済み PR(30日)
- 14
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
techcsispit/code-corner のほかの issue
-
prime/solution.java doesn't compile: public class PrimeCheck in solution.java, README requires Solution.java with a Solution class対応中かも @tanujb03 が 2 日前に担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
techcsispit/code-corner#35 ·
メンテナーはふだん 1 日以内に返信
-
Prime solution in C++ incorrectly returns true for some composite numbers対応中かも @paramsj が 2 日前に担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 25/100
techcsispit/code-corner#38 ·
メンテナーはふだん 1 日以内に返信
-
Failed compilations always report 0.000 seconds対応中かも @Shivangi-singh18 が 2 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 35/100
techcsispit/code-corner#37 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
fibonacci/solution.c: prints negative numbers for n of 47 or more (F(90) prints -1581614984)対応中かも @tanujb03 が 2 日前に担当しました。 オープンbug good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 25/100
techcsispit/code-corner#27 ·
メンテナーはふだん 1 日以内に返信
-
binary-search/Solution.java: prints -1 when the target is the last element (`9 1 3 5 7 9`) or in a 1-element list (`5 5`)対応中かも @tanujb03 が 2 日前に担当しました。 オープンbug good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 22/100
techcsispit/code-corner#26 ·
メンテナーはふだん 1 日以内に返信
techcsispit/code-corner の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
huggingface/peft#3955 ·
メンテナーはふだん 1 日以内に返信
-
author-page correction
難易度 2/5 1〜3時間 初心者へのやさしさ 60/100
acl-org/acl-anthology#10313 ·
メンテナーはふだん 1 日以内に返信
-
anime duplicate exception request-theme
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
LizardByte/ThemerrDB#8926 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
huggingface/transformers#49556 ·
メンテナーはふだん 1 日以内に返信
-
area/security bug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
mozilla-ai/otari#2245 ·
メンテナーはふだん 1 日以内に返信