Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -218,8 +218,8 @@ if __name__ == "__main__":
|
|
| 218 |
response.raise_for_status()
|
| 219 |
questions_data = response.json()
|
| 220 |
if not questions_data:
|
| 221 |
-
|
| 222 |
-
|
| 223 |
print(f"Fetched {len(questions_data)} questions.")
|
| 224 |
except requests.exceptions.RequestException as e:
|
| 225 |
print(f"Error fetching questions: {e}")
|
|
|
|
| 218 |
response.raise_for_status()
|
| 219 |
questions_data = response.json()
|
| 220 |
if not questions_data:
|
| 221 |
+
print("Fetched questions list is empty.")
|
| 222 |
+
return "Fetched questions list is empty or invalid format.", None
|
| 223 |
print(f"Fetched {len(questions_data)} questions.")
|
| 224 |
except requests.exceptions.RequestException as e:
|
| 225 |
print(f"Error fetching questions: {e}")
|