Answer the question
In order to leave comments, you need to log in
Error while working with api QIWI. What to do?
I have code:
from SimpleQIWI import *
token = config.CONFIG['qiwi']
phone = config.CONFIG['phone']
api = QApi(token=token, phone=phone)
api.pay(account=user_phone, amount=price, comment='перевод')
Traceback (most recent call last):
File "main.py", line 462, in <module>
client.polling(none_stop=True, interval=0)
File "C:\Users\Дом\AppData\Local\Programs\Python\Python38\lib\site-packages\telebot\__init__.py", line 619, in polling
self.__threaded_polling(none_stop, interval, timeout, long_polling_timeout, allowed_updates)
File "C:\Users\Дом\AppData\Local\Programs\Python\Python38\lib\site-packages\telebot\__init__.py", line 678, in __threaded_polling
raise e
File "C:\Users\Дом\AppData\Local\Programs\Python\Python38\lib\site-packages\telebot\__init__.py", line 641, in __threaded_polling
self.worker_pool.raise_exceptions()
File "C:\Users\Дом\AppData\Local\Programs\Python\Python38\lib\site-packages\telebot\util.py", line 130, in raise_exceptions
raise self.exception_info
File "C:\Users\Дом\AppData\Local\Programs\Python\Python38\lib\site-packages\telebot\util.py", line 82, in run
task(*args, **kwargs)
File "main.py", line 139, in money_exit2
api.pay(account=user_phone, amount=price, comment='Вывод денег из торогового бота')
File "C:\Users\Дом\AppData\Local\Programs\Python\Python38\lib\site-packages\SimpleQIWI\Session.py", line 230, in pay
data = response.json()
File "C:\Users\Дом\AppData\Local\Programs\Python\Python38\lib\site-packages\requests\models.py", line 910, in json
return complexjson.loads(self.text, **kwargs)
File "C:\Users\Дом\AppData\Local\Programs\Python\Python38\lib\json\__init__.py", line 357, in loads
return _default_decoder.decode(s)
File "C:\Users\Дом\AppData\Local\Programs\Python\Python38\lib\json\decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "C:\Users\Дом\AppData\Local\Programs\Python\Python38\lib\json\decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Answer the question
In order to leave comments, you need to log in
The problem is that you are not running the code that you show.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question