run.py: Python solutions are skipped on Windows when run via python instead of python3
Maintainer thường phản hồi trong vòng 1 ngày
Đánh giá
- Độ khó
- 1/5
- Thời gian dự kiến
- Dưới một giờ
- Mức phù hợp với người mới
- 15/100
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- Python
- Star
- 1
- Fork
- 6
- Merge trung bình
- 12 giờ 42 phút
- Pull request đã merge (30 ngày)
- 10
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Không có hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của techcsispit/code-corner
-
prime/solution.java doesn't compile: public class PrimeCheck in solution.java, README requires Solution.java with a Solution classCó thể đã có người làm @tanujb03 đã nhận 1 ngày trước. Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 82/100
techcsispit/code-corner#35 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
fibonacci/solution.c: prints negative numbers for n of 47 or more (F(90) prints -1581614984)Có thể đã có người làm @tanujb03 đã nhận 1 ngày trước. Đang mởbug good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 25/100
techcsispit/code-corner#27 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
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`)Có thể đã có người làm @tanujb03 đã nhận 1 ngày trước. Đang mởbug good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 22/100
techcsispit/code-corner#26 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
roman-numerals/solution.go: 4 prints IIII and 1994 prints MDCCCCLXXXXIIII (no subtractive forms)Có thể đã có người làm @tanujb03 đã nhận 1 ngày trước. Đang mởbug good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 25/100
techcsispit/code-corner#25 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Solution runner ignores non-zero exit codesCó thể đã có người làm @jay23606 đã nhận 1 ngày trước. Đang mởbug good first issue
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 62/100
techcsispit/code-corner#18 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của techcsispit/code-corner
Issue tương tự
-
needs triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
darnitdevorg/darnit#587 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
Maintainer thường phản hồi trong vòng 1 ngày
-
accessibility good first issue
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 92/100
Maintainer thường phản hồi trong vòng 1 ngày
-
llm translation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug bug-hunt
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
Maintainer thường phản hồi trong vòng 1 ngày