run.py: Python solutions are skipped on Windows when run via python instead of python3
I maintainer di solito rispondono entro 1 giorno
Valutazione
- Difficoltà
- 1/5
- Tempo stimato
- Meno di un'ora
- Idoneità per principianti
- 15/100
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- Python
- Stelle
- 1
- Fork
- 6
- Merge medio
- 17h 52m
- PR unite (30g)
- 14
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Nessuna guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di techcsispit/code-corner
-
prime/solution.java doesn't compile: public class PrimeCheck in solution.java, README requires Solution.java with a Solution classForse già presa @tanujb03 l’ha presa 2 giorni fa. Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 82/100
techcsispit/code-corner#35 ·
I maintainer di solito rispondono entro 1 giorno
-
Prime solution in C++ incorrectly returns true for some composite numbersForse già presa @paramsj l’ha presa 2 giorni fa. Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 25/100
techcsispit/code-corner#38 ·
I maintainer di solito rispondono entro 1 giorno
-
Failed compilations always report 0.000 secondsForse già presa @Shivangi-singh18 l’ha presa 2 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 35/100
techcsispit/code-corner#37 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
fibonacci/solution.c: prints negative numbers for n of 47 or more (F(90) prints -1581614984)Forse già presa @tanujb03 l’ha presa 3 giorni fa. Apertabug good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 25/100
techcsispit/code-corner#27 ·
I maintainer di solito rispondono entro 1 giorno
-
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`)Forse già presa @tanujb03 l’ha presa 3 giorni fa. Apertabug good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 22/100
techcsispit/code-corner#26 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di techcsispit/code-corner
Issue simili
-
bug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
openwisp/openwisp-utils#777 ·
-
Boolean statistics (Covered, Confident, JaccardDistant) aggregate to 1.0 without float weightsAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 63/100
google-research/weatherbenchX#310 ·
I maintainer di solito rispondono entro 3 giorni
-
`unload()` returns the trained `modules_to_save` copy instead of the original moduleForse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
huggingface/peft#3955 ·
I maintainer di solito rispondono entro 1 giorno
-
author-page correction
Difficoltà 2/5 1-3 ore Idoneità per principianti 60/100
acl-org/acl-anthology#10313 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
AOSSIE-Org/Gitcord-GithubDiscordBot#147 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno