F
F
fargerik2020-02-07 15:39:19
Python
fargerik, 2020-02-07 15:39:19

What caused the Unicode error?

An error appears in this part of the code: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal.

if message.text =='Товары':
            bot.send_message(message.chat.id, 'Доступные товары')
        elif message.text =='Баланс':
            bot.send_message(message.chat.id, 'Ваш баланс '+balance+' руб.')
        else:
            bot.send_message(message.chat.id, 'Такой команды нет :/')

I looked for options on how to get rid of it, it did not help. Please tell me how to solve! Python 3.8

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question