Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transport endpoint is not connected #91

Open
mehdiboutouzte opened this issue Aug 17, 2023 · 4 comments
Open

Transport endpoint is not connected #91

mehdiboutouzte opened this issue Aug 17, 2023 · 4 comments
Labels

Comments

@mehdiboutouzte
Copy link

Hello,

I'm using mailjet wrapper with python 3.7 on google cloud function, but i'm getting some times this error message :

"/layers/google.python.pip/pip/lib/python3.7/site-packages/mailjet_rest/client.py", line 113, in api_call raise ApiError(e) mailjet_rest.client.ApiError: ('Connection aborted.', OSError(107, 'Transport endpoint is not connected'))

@sahid
Copy link

sahid commented Sep 7, 2023

Yes I have the same issue mentioned. I don't think that the current code is compatible with up to python 3.6 at that point.

@sahid
Copy link

sahid commented Sep 22, 2023

I have stopped to use the python client and replaced it by requests. That works perfectly well now.

@mehdiboutouzte, if you only send emails, It's easy:

requests.post("https://api.mailjet.com/v3.1/send", json=data, auth=(api_key, api_secret))

@nchMrz
Copy link

nchMrz commented Sep 27, 2023

I have the same issue with python 3.7. The same code works utilizing a testing notebook in google vertex AI workbench, when I deploy and run utilizing a cloud function this error (the same error happens utilziing the request library)

Error;
in send_emergency_mail_to_maintainers result = requests.post("https://api.mailjet.com/v3.1/send", json=data, auth=(API_KEY,API_SECRET)) File "/layers/google.python.pip/pip/lib/python3.7/site-packages/requests/api.py", line 115, in post return request("post", url, data=data, json=json, **kwargs) File "/layers/google.python.pip/pip/lib/python3.7/site-packages/requests/api.py", line 59, in request return session.request(method=method, url=url, **kwargs) File "/layers/google.python.pip/pip/lib/python3.7/site-packages/requests/sessions.py", line 589, in request resp = self.send(prep, **send_kwargs) File "/layers/google.python.pip/pip/lib/python3.7/site-packages/requests/sessions.py", line 703, in send r = adapter.send(request, **kwargs) File "/layers/google.python.pip/pip/lib/python3.7/site-packages/requests/adapters.py", line 501, in send raise ConnectionError(err, request=request) requests.exceptions.ConnectionError: ('Connection aborted.', OSError(107, 'Transport endpoint is not connected'))

@fruecker
Copy link

fruecker commented Jan 9, 2024

I deployed an flask app on heroku and encountered the same error. Restarting the dyno fixes it so it must be some kind of a timeout error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants