Python and JavaScript runtime errors show no line number
Los mantenedores suelen responder en 1 día
Evaluación
Este issue todavía no se ha evaluado.
Descripción
Observed behavior
A Python or JavaScript error raised while the tests run is shown with no line number, so the candidate cannot tell which line failed. In JavaScript the error type is dropped too, and syntax errors also have no line.
The Python answer in Reproduction, whose error is on line 2 inside helper, shows:
FAIL nums=[2,7,11,15], target=9 0ms
input [[2,7,11,15],9]
IndexError: list index out of range
The JavaScript answer, whose error is on line 3, shows:
FAIL nums=[2,7,11,15], target=9 1ms
input [[2,7,11,15],9]
Cannot read properties of undefined (reading 'x')
Across 17 broken answers:
| Error | Python | JavaScript |
|---|---|---|
Runtime error in a test case (index, key, type, None/undefined access, misspelled name, recursion, error inside a helper) |
type and message, no line | message only, no type, no line |
| Error at top level | no line | Uncaught ReferenceError: undefinedName is not defined, no line |
| Syntax error | line given, as (<string>, line 4) |
Uncaught SyntaxError: Unexpected token '{', no line |
Expected behavior
The line in the editor where the error was raised, for example:
IndexError: list index out of range (line 2, in helper)
TypeError: Cannot read properties of undefined (reading 'x') (line 3)
Reproduction
-
Open Chargeback Pair Match, select Python, and replace the editor with:
def helper(nums, i): return nums[i] class Solution: def matchDisputedCharge(self, nums, target): a = helper(nums, 0) b = helper(nums, 99) return [a, b] -
Click Run tests.
-
Select JavaScript, replace the editor with:
function matchDisputedCharge(nums, target) { const seen = new Map(); return nums[100].x; } -
Click Run tests.
-
For the syntax error, replace line 3 of the JavaScript with
if (nums.length > 0 {and run again.
CodeTrial version
codetrial 0.1.0 (288a0c9), built from source
Environment
OS: Windows 11
Browser: Edge 157.0.4341.60
Language: Python, JavaScript
Problem: Chargeback Pair Match
Sanitized evidence
A JavaScript syntax error:
Couldn't run your code
Uncaught SyntaxError: Unexpected token '{'
Cause
The line is available but not used.
- Python: the driver formats an exception as
f"{type(exc).__name__}: {exc}"(web/runners.js:1218,:1276) and ignoresexc.__traceback__, which holds the candidate's frames.exec(user_code, ns)(:1216) names the code<string>. - JavaScript: the worker keeps
error.message(web/runners.js:864) and dropserror.nameanderror.stack.worker.onerrorkeepsevent.message(:935) and dropsevent.lineno. The candidate's code is the first part of the worker source (:898), so its stack lines are already editor lines.
Related: #217 made C, C++ and Java compile errors cite editor lines; Python and JavaScript errors still cite none.
Questions
- Format: is
(line N, in function)after the message right, and should theUncaughtprefix and<string>go? - Tests: nothing runs the Python driver today. Should a test run it on CPython from
node --test(skipped whenpython3is absent), or through Pyodide inscripts/browser-check.sh?
Public data confirmation
- I removed credentials, session tokens, candidate recordings, and personal interview content from this public report.
- Lenguaje dominante
- Rust
- Estrellas
- 236
- Forks
- 153
- Merge medio
- 1 d 9 h
- PR fusionados (30 d)
- 187
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de sysprog21/codetrial
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Dificultad 3/5 1-2 días Aptitud para principiantes 70/100
Los mantenedores suelen responder en 1 día
-
Unify Java harness validation error messagesPosiblemente ocupada @weichieh0204 la tomó hoy. Abierto
sysprog21/codetrial#872 · 1 comentario · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Inferred void class operations are never checked against the starter's return typePosiblemente ocupada @papaya0112 la tomó hoy. Abierto
sysprog21/codetrial#871 · 1 comentario · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Edge Thumbnail Store accepts a store that does not refresh a key on overwritePosiblemente ocupada @BOBOGUAGUA428 la tomó hoy. Abierto
sysprog21/codetrial#869 · 1 comentario · 1 asignado ·
Los mantenedores suelen responder en 1 día
Todos los issues de sysprog21/codetrial
Issues similares
-
needs-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
manaflow-ai/cmux#59692 ·
Los mantenedores suelen responder en 1 día
-
Retire stale Python-parity labels in Rust ingress and auth testsPosiblemente ocupada @github-actions la tomó hoy. Abiertofactory factory:building factory:unowned ralph-status:in-progress via:opencode-free/hy4-flash-free
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
JoshCLWren/comic-pile#5874 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
status:ready unit
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
nonagenticai/conveyor#787 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 79/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día