Skip to content
This repository was archived by the owner on Nov 28, 2024. It is now read-only.
This repository was archived by the owner on Nov 28, 2024. It is now read-only.

socket.timeout() raises AttributeError Exception #72

Description

@dgonzalez-cs

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.

image

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions