Вот отрывок кода с pyqiwip2p:
new_bill = p2p.bill(bill_id=randint(100000000, 999999999), amount=sumcost, lifetime=120)
print(new_bill.bill_id, new_bill.pay_url)
while True:
print(p2p.check(bill_id=new_bill.bill_id).status)
try:
if p2p.check(bill_id=new_bill.bill_id).status == "PAID":
vk.messages.send( # Отправляем сообщение
user_id=event.user_id,
message="Платеж подтверждён...",
random_id=0
)
for a in range(len(requested)):
paidpacks.append(plinks[requested[a]])
for a in range(len(requested)):
vk.messages.send( # Отправляем сообщение
user_id=event.user_id,
message=paid[a],
random_id=0
)
break
except pyqiwip2p.Qiwip2p.QiwiError:
print("qiwi error")
sleep(3)
sleep(1)
Весь код ошибки:
Traceback (most recent call last):
File "C:/Users/SuperUser/PycharmProjects/bot/main.py", line 149, in <module>
print(p2p.check(bill_id=new_bill.bill_id).status)
File "C:\Users\SuperUser\PycharmProjects\bot\venv\lib\site-packages\pyqiwip2p\Qiwip2p.py", line 114, in check
qiwi_response = Bill(qiwi_raw_response, self)
File "C:\Users\SuperUser\PycharmProjects\bot\venv\lib\site-packages\pyqiwip2p\p2p_types\Responses.py", line 80, in __init__
json_data=self.r_json["customer"]) if "customer" in self.r_json else None
File "C:\Users\SuperUser\PycharmProjects\bot\venv\lib\site-packages\pyqiwip2p\p2p_types\Customer.py", line 45, in __init__
self.email = json_data["email"]
KeyError: 'email'
Попробовал через p2p.check(new_bill).status и получил это:
Traceback (most recent call last):
File "C:/Users/SuperUser/PycharmProjects/bot/main.py", line 150, in <module>
print(p2p.check(new_bill).status)
File "C:\Users\SuperUser\PycharmProjects\bot\venv\lib\site-packages\pyqiwip2p\Qiwip2p.py", line 114, in check
qiwi_response = Bill(qiwi_raw_response, self)
File "C:\Users\SuperUser\PycharmProjects\bot\venv\lib\site-packages\pyqiwip2p\p2p_types\Responses.py", line 67, in __init__
raise QiwiError(self.r_json)
File "C:\Users\SuperUser\PycharmProjects\bot\venv\lib\site-packages\pyqiwip2p\p2p_types\Errors.py", line 34, in __init__
self.datetime = QiwiDatetime(response_json["dateTime"])
File "C:\Users\SuperUser\PycharmProjects\bot\venv\lib\site-packages\pyqiwip2p\p2p_types\QiwiDatetime.py", line 38, in __init__
self.set_from_qiwi(moment)
File "C:\Users\SuperUser\PycharmProjects\bot\venv\lib\site-packages\pyqiwip2p\p2p_types\QiwiDatetime.py", line 78, in set_from_qiwi
self.datetime = self.qiwi_datetime(dt)
File "C:\Users\SuperUser\PycharmProjects\bot\venv\lib\site-packages\pyqiwip2p\p2p_types\QiwiDatetime.py", line 70, in qiwi_datetime
return datetime.strptime(dt, "%Y-%m-%dT%H:%M:%S.%f%z")
File "C:\Users\SuperUser\AppData\Local\Programs\Python\Python36-32\lib\_strptime.py", line 565, in _strptime_datetime
tt, fraction = _strptime(data_string, format)
File "C:\Users\SuperUser\AppData\Local\Programs\Python\Python36-32\lib\_strptime.py", line 362, in _strptime
(data_string, format))
ValueError: time data '2022-07-26T21:22:35.575+03:00' does not match format '%Y-%m-%dT%H:%M:%S.%f%z'