paramiko / paramiko/paramiko

v2.6.0 emits lines to stderr

Open
#1,489 1 comment 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
9.9k
Forks
2.1k
PR merge metrics
No merged PRs in 30d

Description

In my script I'm trying to SSH to several addresses in a range. I do not know the underlying condition that is causing this error (below)... BUT the BUG is that these lines are emitted to the stderr, which glops up the output from my script.

Please either:

  • handle this error (and don't emit lines to either the stdout or stderr)
  • ignore the error (and don't emit lines to either the stdout or stderr)
  • if the condition should be of interest to the API user (me), then RAISE an error, and I'll catch it and handle the case ... and STILL and don't emit lines to either the stdout or stderr!
Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/paramiko/transport.py", line 2109, in run
    handler(self.auth_handler, m)
  File "/usr/local/lib/python3.5/dist-packages/paramiko/auth_handler.py", line 278, in _parse_service_accept
    m.add_string(self.username)
  File "/usr/local/lib/python3.5/dist-packages/paramiko/message.py", line 274, in add_string
    self.add_int(len(s))
TypeError: object of type 'NoneType' has no len()

Thanks...

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the traceback in paramiko/transport.py at run, then inspect auth_handler.py at _parse_service_accept and message.py at add_string. Reproduce the SSH connection attempt and determine how the reported condition should be surfaced. Done means the condition no longer writes unwanted output to stdout or stderr while remaining appropriately observable to the API user.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.