Script doesn't see elif function

In short, the ELIF function is not executed. IF - is executed.

def skills(call):
try:
if call.message:

        if call.data == 'gtn':
            answer = random.randint(1, 30)
            bot.send_message(call.message.chat.id, "blah blah")

        elif call.data == 'sm':
            mofquestion = types.InlineKeyboardMarkup(row_width=2)
            mofbutton1 = types.InlineKeyboardButton("blah blah", callback_data='male')
            mofbutton2 = types.InlineKeyboardButton("blah blah", callback_data='female')

            mofquestion.add(mofbutton1, mofbutton2)
            bot.send_message(call.message.chat.id, "blah blah", reply_markup=mofquestion)
            try:
                if call.message:
                    if call.data == 'female':
                        bot.send_message(call.message.chat.id,
                                         "blah blah ")
                    elif call.data == 'male':
                        hms = random.randint(1, 30)  
                        if hms <= 10:
                            bot.send_message(call.message.chat.id,
                                             "blah blah.")
            except Exception as e:
                print(repr(e))
except Exception as e:
    print(repr(e))