signalwire-python
signalwire-python copied to clipboard
Provide a page referencing API Error codes and messages with sitiations where they might be encountered
Whenn I try and send an SMS, I enounter this message. I could not find any information on the signarlwire site.
WARNING:root:relay.signalwire.com seems down.. INFO:root:Connection closed..
I assume you are using Relay. It also looks like the error message is clear on what is happening. Have you checked you have the correct Space URL?
Well, if the space url is incorrect, should there be a message indicating it rather than a weird message indicating some endpoint being down?
Hi @senthilmk, can you share a code snippet to help me reproduce the error please? You can include the Python version and environment too. Thanks!
Sorry to resurrect this but I'm having the same issue. @lpradovera mentioned something about a Space URL, where would that be passed to the library? I'm struggling to find any reference to that in the docs.
I'm using code very similar to this example and getting the error when calling consumer.run(). Digging into the code I see an error on line 88 of client.py:
Cannot connect to host relay.signalwire.com:443 ssl:True [SSLCertVerificationError: (1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:997)')]
From what I can tell, the issue is that aiohttp is using an incomplete/outdate set of root certificates. This can be resolved by passing the bundle from certifi in connection.py:
async def connect(self):
logging.debug('Connecting to: {0}'.format(self.host))
ssl_context = ssl.create_default_context(cafile=certifi.where())
self.ws = await self._session.ws_connect(self.host, ssl_context=ssl_context)
Happy to make a PR for it if that'd be helpful, I'm not sure if there's a better solution though.
Hey @WilliamOConnell!
I made some tests and i'm not seeing the CERTIFICATE_VERIFY_FAILED error. Can you give it another shot and also share more infos about your environment (SDK/python version / OS)?
FYI: the Space URL is out of context for this issue.
Thanks!
I'm using Python 3.10 on Windows 10 (x64). Signalwire package version 2.0.4. When I run it I get the WARNING:root:relay.signalwire.com seems down.. message but with a debugger I can see that it's catching an SSL error.