A
A
ARN0LD2020-05-15 01:29:42
Python
ARN0LD, 2020-05-15 01:29:42

How to solve SimpleQIWI.Errors.OverridingEx: Overriding bill!?

I am making a telegram bot using SimpleQiwi.
Essence:
1 The bot issues an invoice
2 And starts the verification cycle
3 If a person paid, then all the rules are not errors, nothing
4. If you clicked / start or something else and canceled the payment, then the bot stops issuing invoices not only to one user, but to all . But after someone, no matter who canceled the cycle, any user or bot simply stops issuing a new account, gives an error "OverridingEx", I began to catch it so that it would not crash, but the essence of the problem remained.
Who can tell how to solve the problem.
The loop itself:

elif message.text == '100 рублей':
      try:
        mar = types.ReplyKeyboardMarkup(resize_keyboard=True) #keyboard (сумма пополнения)
        item5 = types.KeyboardButton("/start")
        mar.add(item5)
        bot.send_message(message.chat.id, "Внимание! Если вы введёте неверный комментарий, то ваш платёж не будет засчитан. У вас есть 2 минуты на оплату.", reply_markup=mar)
        price = 100                   # Минимальное значение при котором счет будет считаться закрытым
        comment = api.bill(price)   # Создаем счет. Комментарий с которым должен быть платеж генерируется автоматически, но его можно задать

        bot.send_message(message.chat.id, "Переведите %i рублей(-ь) на счет %s с комментарием '%s'" % (price, phone, comment))

        api.start() #начинаю проверку

        while True:

          sleep(120)

          bot.send_message(message.chat.id, "Время вышло, нажмите на /start")
          api.stop() #останавливаю проверку

          break

          if api.check(comment): #если всё окей, то пишу следующее
            bot.send_message(message.chat.id, "Платёж получен!")
            break

          sleep(1)

        api.stop() # останавливаю проверку
      except OverridingEx: #Ловлю ошибку
        bot.send_message(message.chat.id, 'ERROR')


Mistake:

2020-05-15 01:20:45,594 (util.py:68 WorkerThread2) ERROR - TeleBot: "OverridingEx occurred, args=('Overriding bill!',)
Traceback (most recent call last):
File "C:\Users \user\AppData\Local\Programs\Python\Python38-32\lib\site-packages\telebot\util.py", line 62, in run
task(*args, **kwargs)
File "bot.py", line 75, in first
comment = api.bill(price) # ▒▒▒▒ ▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒▒▒▒▒▒, ▒▒ ▒▒▒ ▒▒▒▒ ▒▒▒▒ ▒▒
File "C:\Users\user\AppData\Local\Programs\Python\Python38-32\lib\site-packages\SimpleQIWI\Session.py", line 106, in bill
raise OverridingEx('Overriding bill!')
SimpleQIWI.Errors.OverridingEx: Overriding bill!
"
Traceback (most recent call last):
File "bot.py", line 93, in
bot.polling(none_stop=True)
File "C:\Users\user\AppData\Local\Programs\Python\Python38-32\lib\ site-packages\telebot\__init__.py", line 415, in polling
self.__threaded_polling(none_stop, interval, timeout)
File "C:\Users\user\AppData\Local\Programs\Python\Python38-32\lib\site -packages\telebot\__init__.py", line 439, in __threaded_polling
self.worker_pool.raise_exceptions()
File "C:\Users\user\AppData\Local\Programs\Python\Python38-32\lib\site-packages\telebot \util.py", line 111, in raise_exceptions
six.reraise(self.exc_info[0], self.exc_info[1], self.exc_info[2])
File "C:\Users\user\AppData\Roaming\Python\Python38\site-packages\six.py", line 703, in reraise
raise value
File "C:\Users\user\AppData\Local\Programs\Python\ Python38-32\lib\site-packages\telebot\util.py", line 62, in run
task(*args, **kwargs)
File "bot.py", line 75, in first
comment = api.bill(price ) # ▒▒▒▒▒▒▒ ▒▒▒▒. ▒▒▒▒▒▒▒▒▒▒▒ ▒ ▒▒▒▒▒▒▒ ▒▒▒▒▒▒ ▒▒▒▒ ▒▒▒▒▒▒ ▒▒▒ ▒▒▒ File "C:\Users\user\AppData\Local\Programs\Python\ Python38-32
\lib\ site-packages\SimpleQIWI\Session.py", line 106, in bill
raise OverridingEx('Overriding bill!')
SimpleQIWI.Errors.OverridingEx: Overriding bill!


Please help. If something is not clear in the code - write, I will explain.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Pitoner, 2020-05-22
@McRcon

Recently used SimpleQiwi also gave such an error
Most likely SimpleQiwi Outdated for new versions of Python

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question