Spaces:
Paused
Paused
debug: Excel file does not have 'question' column
Browse files- bot_telegram.py +5 -4
bot_telegram.py
CHANGED
|
@@ -235,16 +235,17 @@ class TelegramBot:
|
|
| 235 |
f"Please make sure the file has 'rfp' sheet with 'question' column."
|
| 236 |
)
|
| 237 |
return
|
|
|
|
| 238 |
if df.empty:
|
| 239 |
await update.message.reply_text(
|
| 240 |
-
|
| 241 |
-
f"Excel file is empty."
|
| 242 |
)
|
| 243 |
return
|
|
|
|
| 244 |
if 'question' not in df.columns:
|
| 245 |
await update.message.reply_text(
|
| 246 |
-
|
| 247 |
-
|
| 248 |
)
|
| 249 |
return
|
| 250 |
#print("debug 1")
|
|
|
|
| 235 |
f"Please make sure the file has 'rfp' sheet with 'question' column."
|
| 236 |
)
|
| 237 |
return
|
| 238 |
+
|
| 239 |
if df.empty:
|
| 240 |
await update.message.reply_text(
|
| 241 |
+
"❌ Error: Excel file is empty."
|
|
|
|
| 242 |
)
|
| 243 |
return
|
| 244 |
+
|
| 245 |
if 'question' not in df.columns:
|
| 246 |
await update.message.reply_text(
|
| 247 |
+
"❌ Error: Excel file does not have 'question' column.\n"
|
| 248 |
+
"Please make sure your Excel file has a column named 'question'."
|
| 249 |
)
|
| 250 |
return
|
| 251 |
#print("debug 1")
|