Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 14331

SSLCertVerificationError How i can fix?

$
0
0

i have some problems, when i start my bot in windows then full work, but when i start in macOS 13.5.1 i have error like this

during handling of the above exception, another exception occurred:Traceback (most recent call last):  File "/Users/aleksandr/Desktop/allProjectsPy/multiBots/main.py", line 60, in <module>    asyncio.run(main())  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/asyncio/runners.py", line 44, in run    return loop.run_until_complete(main)  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete    return future.result()  File "/Users/aleksandr/Desktop/allProjectsPy/multiBots/main.py", line 51, in main    await mbot.get_updates(offset=-1)  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/aiogram/client/bot.py", line 412, in get_updates    return await self(call, request_timeout=request_timeout)  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/aiogram/client/bot.py", line 354, in __call__    return await self.session(self, method, timeout=request_timeout)  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/aiogram/client/session/base.py", line 182, in __call__    return cast(TelegramType, await middleware(bot, method))  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/aiogram/client/session/aiohttp.py", line 152, in make_request    raise TelegramNetworkError(method=method, message=f"{type(e).__name__}: {e}")aiogram.exceptions.TelegramNetworkError: ClientConnectorCertificateError: Cannot connect to host api.telegram.org:443 ssl:True [SSLCertVerificationError: (1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1122)')]Unclosed client sessionclient_session: <aiohttp.client.ClientSession object at 0x7fa618587df0>

my packeges:

aiofiles==22.1.0aiogram==3.0.0b5aiohttp==3.8.5aiosignal==1.3.1async-timeout==4.0.3attrs==23.1.0cffi==1.15.1charset-normalizer==3.2.0cryptography==41.0.3frozenlist==1.4.0idna==3.4magic-filter==1.0.11multidict==6.0.4peewee==3.16.3pycparser==2.21pydantic==1.10.12pyOpenSSL==23.2.0typing_extensions==4.7.1yarl==1.9.2

i try this pip install --upgrade pyOpenSSLand use only pip install -r requiments


Viewing all articles
Browse latest Browse all 14331

Trending Articles