Spaces:
Runtime error
Runtime error
Commit
·
110d7be
1
Parent(s):
712b2f5
Mensajes de error si no hay archivos seleccionados
Browse files
app.py
CHANGED
@@ -19,10 +19,11 @@ def Main(uploadedFile, txtFileInput, orthographyPercentage, syntaxPercentage, se
|
|
19 |
copySpanishDictionaries()
|
20 |
|
21 |
try:
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
|
|
26 |
|
27 |
configuration = readQATextFile(txtFileInput)
|
28 |
|
@@ -35,10 +36,10 @@ def Main(uploadedFile, txtFileInput, orthographyPercentage, syntaxPercentage, se
|
|
35 |
|
36 |
configuration["students"] = studentsRange
|
37 |
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
|
43 |
config_json = load_json("configV2.json")
|
44 |
|
|
|
19 |
copySpanishDictionaries()
|
20 |
|
21 |
try:
|
22 |
+
if not txtFileInput:
|
23 |
+
error="Por favor seleccione un archivo con las preguntas y respuestas"
|
24 |
+
return [error, excelPath]
|
25 |
+
else:
|
26 |
+
txtFileInput = txtFileInput.name
|
27 |
|
28 |
configuration = readQATextFile(txtFileInput)
|
29 |
|
|
|
36 |
|
37 |
configuration["students"] = studentsRange
|
38 |
|
39 |
+
if not uploadedFile:
|
40 |
+
error="Por favor seleccione el .zip con las respuestas de los alumnos"
|
41 |
+
else:
|
42 |
+
uploadedFilePath = uploadedFile.name
|
43 |
|
44 |
config_json = load_json("configV2.json")
|
45 |
|