run.py: Python solutions are skipped on Windows when run via python instead of python3
Mantenedores costumam responder em até 1 dia
Avaliação
- Dificuldade
- 1/5
- Tempo estimado
- Menos de uma hora
- Facilidade para iniciantes
- 15/100
Direção de pesquisa
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.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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.
- Linguagem predominante
- Python
- Estrelas
- 1
- Forks
- 6
- Merge médio
- 17h 52min
- PRs com merge (30d)
- 14
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Sem guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de techcsispit/code-corner
-
prime/solution.java doesn't compile: public class PrimeCheck in solution.java, README requires Solution.java with a Solution classTalvez já em andamento @tanujb03 assumiu há 2 dias. Aberta
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 82/100
techcsispit/code-corner#35 ·
Mantenedores costumam responder em até 1 dia
-
Prime solution in C++ incorrectly returns true for some composite numbersTalvez já em andamento @paramsj assumiu há 2 dias. Aberta
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 25/100
techcsispit/code-corner#38 ·
Mantenedores costumam responder em até 1 dia
-
Failed compilations always report 0.000 secondsTalvez já em andamento @Shivangi-singh18 assumiu há 1 dia. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 35/100
techcsispit/code-corner#37 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
fibonacci/solution.c: prints negative numbers for n of 47 or more (F(90) prints -1581614984)Talvez já em andamento @tanujb03 assumiu há 2 dias. Abertabug good first issue
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 25/100
techcsispit/code-corner#27 ·
Mantenedores costumam responder em até 1 dia
-
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`)Talvez já em andamento @tanujb03 assumiu há 2 dias. Abertabug good first issue
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 22/100
techcsispit/code-corner#26 ·
Mantenedores costumam responder em até 1 dia
Todas as issues de techcsispit/code-corner
Issues semelhantes
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
huggingface/peft#3955 ·
Mantenedores costumam responder em até 1 dia
-
author-page correction
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 60/100
acl-org/acl-anthology#10313 ·
Mantenedores costumam responder em até 1 dia
-
anime duplicate exception request-theme
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 82/100
LizardByte/ThemerrDB#8926 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
huggingface/transformers#49556 ·
Mantenedores costumam responder em até 1 dia
-
area/security bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
mozilla-ai/otari#2245 ·
Mantenedores costumam responder em até 1 dia