layerqa / aiocryptopay Goto Github PK
View Code? Open in Web Editor NEWhttps://t.me/CryptoBot api asynchronous python wrapper
Home Page: https://pypi.org/project/aiocryptopay/
License: MIT License
https://t.me/CryptoBot api asynchronous python wrapper
Home Page: https://pypi.org/project/aiocryptopay/
License: MIT License
I use the getMe method to get all my invoices, some I can delete, but one - i can't .
I'm sure I'm taking the correct invoice_id, but when deleting it, it tells me that: [400] INVOICE NOT FOUND.
INVOICE IS PAID
I think it's not the api's fault, but some kind of bug.
import asyncio
from aiocryptopay import AioCryptoPay, Networks
from config import TEST_CRYPTO_BOT_API
async def main():
crypto = AioCryptoPay(token=TEST_CRYPTO_BOT_API, network=Networks.TEST_NET)
delete = await crypto.delete_invoice(invoice_id=169539)
print(delete)
await crypto.close()
asyncio.run(main())
While I've been trying to run the code, I got RuntimeError. To solve it, I replaced from self._loop.run_until_complete(self._session.close()) to asyncio.create_task(self._session.close()) in del BaseClient class and it's works!
Author, please replace it in pypi.org
I encountered a dependency conflict issue related to the aiocryptopay
package version 0.2.8 and its requirement for pydantic<2.0.0 and >=1.10.7
. This specific requirement is incompatible with several other libraries that depend on different versions of pydantic
, making it difficult to use aiocryptopay
in conjunction with other packages.
As an example, the library aiogram
(versions 3.0.0rc2
, 3.0.0b9
) depends on pydantic<3 and >=2.1.1
, which conflicts with the constraints set by aiocryptopay
.
The error message I received:
ERROR: Cannot install -r .\requirements.txt (line 1) and -r .\requirements.txt (line 25) because these package versions have conflicting dependencies.
The conflict is caused by:
aiocryptopay 0.2.8 depends on pydantic<2.0.0 and >=1.10.7
aiogram 3.0.0rc2 depends on pydantic<3 and >=2.1.1
aiocryptopay 0.2.8 depends on pydantic<2.0.0 and >=1.10.7
aiocryptopay 0.2.8 depends on pydantic<2.0.0 and >=1.10.7
aiogram 3.0.0b9 depends on pydantic~=2.1.1
Environment details:
The issue prevents me from using aiocryptopay
in projects that also depend on other libraries with conflicting pydantic
requirements. I kindly request an update to support a broader range of pydantic
versions.
Thank you
В ClientSession() библиотеки aiohttp передается **kwargs
, который содержит ключи params
и headers
, но так как в последней версии aiohttp ClientSession не принимает в себя params, код выбрасывает ошибку.
Вот неработающая функция:
def get_session(self, **kwargs):
"""Get cached session. One session per instance."""
if isinstance(self._session, ClientSession) and not self._session.closed:
return self._session
ssl_context = ssl.create_default_context(cafile=certifi.where())
connector = TCPConnector(ssl=ssl_context)
self._session = ClientSession(connector=connector, **kwargs)
return self._session
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.