baha-99 commited on
Commit
c4b00fb
·
1 Parent(s): a8c6e50

debug: Excel file does not have 'question' column

Browse files
Files changed (1) hide show
  1. 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
- f"❌ Error reading Excel file: {str(e)}\n"
241
- f"Excel file is empty."
242
  )
243
  return
 
244
  if 'question' not in df.columns:
245
  await update.message.reply_text(
246
- f"❌ Error reading Excel file: {str(e)}\n"
247
- f"Excel file does not have 'question' column."
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")