Open BramVanroy opened 5 years ago
Hmm that's strange indeed. I am solely working on instances on the cloud and have never encountered this problem. It seems the bug stems from yagmail, and more specifically when it calls keyring (the password manager). I have to look at it more precisely...
Hmm that's strange indeed. I am solely working on instances on the cloud and have never encountered this problem. It seems the bug stems from yagmail, and more specifically when it calls keyring (the password manager). I have to look at it more precisely...
If it matters, I am using Ubuntu 18.04.2 LTS x86_64.
Hello @VictorSanh I am also facing same issue. I am running code in cluster with OS Ubuntu 16.04.6 LTS (GNU/Linux 4.4.0-161-generic x86_64)
:
from knockknock import email_sender
@email_sender(recipient_emails=["abc@gmail.com"], sender_email="def@gmail.com")
def train_your_nicest_model():
import time
time.sleep(300)
return {'loss': 0.9} # Optional return value
train_your_nicest_model()
I am getting following error:
Traceback (most recent call last):
File "knockknock_example.py", line 9, in <module>
train_your_nicest_model()
File "/home/ramesh/.virtualenvs/code_of_conduct_env/lib/python3.6/site-packages/knockknock/email_sender.py", line 53, in wrapper_sender
yag_sender.send(current_recipient, 'Training has started 🎬', contents)
File "/home/ramesh/.virtualenvs/code_of_conduct_env/lib/python3.6/site-packages/yagmail/sender.py", line 147, in send
self.login()
File "/home/ramesh/.virtualenvs/code_of_conduct_env/lib/python3.6/site-packages/yagmail/sender.py", line 246, in login
self._login(self.credentials)
File "/home/ramesh/.virtualenvs/code_of_conduct_env/lib/python3.6/site-packages/yagmail/sender.py", line 192, in _login
self.smtp = self.connection(self.host, self.port, **self.kwargs)
File "/usr/lib/python3.6/smtplib.py", line 1031, in __init__
source_address)
File "/usr/lib/python3.6/smtplib.py", line 251, in __init__
(code, msg) = self.connect(host, port)
File "/usr/lib/python3.6/smtplib.py", line 336, in connect
self.sock = self._get_socket(host, port, self.timeout)
File "/usr/lib/python3.6/smtplib.py", line 1037, in _get_socket
self.source_address)
File "/usr/lib/python3.6/socket.py", line 724, in create_connection
raise err
File "/usr/lib/python3.6/socket.py", line 713, in create_connection
sock.connect(sa)
OSError: [Errno 101] Network is unreachable
Hello @VictorSanh I am also facing same issue. I am running code in cluster with OS
Ubuntu 16.04.6 LTS (GNU/Linux 4.4.0-161-generic x86_64)
:from knockknock import email_sender @email_sender(recipient_emails=["abc@gmail.com"], sender_email="def@gmail.com") def train_your_nicest_model(): import time time.sleep(300) return {'loss': 0.9} # Optional return value train_your_nicest_model()
I am getting following error:
Traceback (most recent call last): File "knockknock_example.py", line 9, in <module> train_your_nicest_model() File "/home/ramesh/.virtualenvs/code_of_conduct_env/lib/python3.6/site-packages/knockknock/email_sender.py", line 53, in wrapper_sender yag_sender.send(current_recipient, 'Training has started 🎬', contents) File "/home/ramesh/.virtualenvs/code_of_conduct_env/lib/python3.6/site-packages/yagmail/sender.py", line 147, in send self.login() File "/home/ramesh/.virtualenvs/code_of_conduct_env/lib/python3.6/site-packages/yagmail/sender.py", line 246, in login self._login(self.credentials) File "/home/ramesh/.virtualenvs/code_of_conduct_env/lib/python3.6/site-packages/yagmail/sender.py", line 192, in _login self.smtp = self.connection(self.host, self.port, **self.kwargs) File "/usr/lib/python3.6/smtplib.py", line 1031, in __init__ source_address) File "/usr/lib/python3.6/smtplib.py", line 251, in __init__ (code, msg) = self.connect(host, port) File "/usr/lib/python3.6/smtplib.py", line 336, in connect self.sock = self._get_socket(host, port, self.timeout) File "/usr/lib/python3.6/smtplib.py", line 1037, in _get_socket self.source_address) File "/usr/lib/python3.6/socket.py", line 724, in create_connection raise err File "/usr/lib/python3.6/socket.py", line 713, in create_connection sock.connect(sa) OSError: [Errno 101] Network is unreachable
@rameshjesswani, are you sure it's the same error? It looks like it's something different causing your error... Did you make sure you gave yagmail access to the email you're using? (see here).
I am running my code through SSH. My connecting device is a Windows 10 computer, and the machine actually doing the training is a linux server. When I use knockknock, though, I get the following trace.
It states "Item does not exist" but I'm not sure which item it's referring to. This happens as soon as I launch the code, so I haven't been prompted for a password. In fact, it seems that the prompt is where things go wrong.