WhiteApfel / pyQiwiP2P

Simple wrapper for comfortable work with the API of payment system for individuals QiwiP2P
Mozilla Public License 2.0
54 stars 12 forks source link

QiwiDatetime Parser Error #8

Closed Michaelloitalliano closed 3 years ago

Michaelloitalliano commented 3 years ago

File "bot.py", line 236, in callback_inline bill = wallet.check(bill_id=bill_id) File "/usr/local/lib/python3.8/dist-packages/pyqiwip2p/Qiwip2p.py", line 118, in check qiwi_response = Bill(qiwi_raw_response, self) File "/usr/local/lib/python3.8/dist-packages/pyqiwip2p/p2p_types/Responses.py", line 67, in init raise QiwiError(self.r_json) File "/usr/local/lib/python3.8/dist-packages/pyqiwip2p/p2p_types/Errors.py", line 34, in init self.datetime = QiwiDatetime(response_json["dateTime"]) File "/usr/local/lib/python3.8/dist-packages/pyqiwip2p/p2p_types/QiwiDatetime.py", line 40, in init raise TypeError("The string does not match the format 'ГГГГ-ММ-ДДTчч:мм:сс+-чч:мм'")

Michaelloitalliano commented 3 years ago

проблема в regexp [0-9]{4}-[01][0-9]-[0-3][0-9]T[0-2][0-9]:[0-5][0-9]:[0-5][0-9][+-][0-1][0-9]:[0-5][0-9], пример dateTime в доке киви: 2021-01-18T14:34:40.865+03:00 Т.е выражение должно быть [0-9]{4}-[01][0-9]-[0-3][0-9]T[0-2][0-9]:[0-5][0-9]:[0-5][0-9].[0-9]{3}[+-][0-1][0-9]:[0-5][0-9]

lionead commented 3 years ago

закинул пулл реквест, ждём пока примет, пока можешь оттуда юзать

WhiteApfel commented 3 years ago

Постаюсь в течение пары часов собрать и отправить в pypi

WhiteApfel commented 3 years ago

Та-да 🎉 https://pypi.org/project/pyQiwiP2P

python -m pip install -U pyqiwip2p