paramiko-expect
paramiko-expect copied to clipboard
socket.timeout() raises AttributeError Exception
I'm always managing my exceptions in my code but I keep not getting the actual information of the "generic" Exception when this happens. I have at my code a part where I except Exception as e:
and where I print the e
but I keep getting "None". Using my debugger I saw this happening in that part. I wasn't able to print the information of the exception because of an Attribute not being found after socket.timeout() exception is risen.
Traceback (most recent call last):
File "/Users/dglez/Library/Python/3.8/lib/python/site-packages/paramiko/channel.py", line 699, in recv
out = self.in_buffer.read(nbytes, self.timeout)
File "/Users/dglez/Library/Python/3.8/lib/python/site-packages/paramiko/buffered_pipe.py", line 164, in read
raise PipeTimeout()
paramiko.buffered_pipe.PipeTimeout
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/dglez/myproject", line 1808, in myfunction
myexpect.expect("some string.*", timeout=60)
File "/Users/dglez/Library/Python/3.8/lib/python/site-packages/paramiko_expect.py", line 144, in expect
current_buffer = self.channel.recv(self.buffer_size)
File "/Users/dglez/Library/Python/3.8/lib/python/site-packages/paramiko/channel.py", line 701, in recv
raise socket.timeout()
socket.timeout
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/dglez/.vscode/extensions/ms-python.python-2021.6.944021595/pythonFiles/lib/python/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_resolver.py", line 193, in _get_py_dictionary
attr = getattr(var, name)
AttributeError: characters_written
Did I came to the right place to open this issue?
You'll need to supply a bit more information.
A code snippet showing the problem.
From what you share it look like a regular socket.timeout that being raised...