MarketSquare / MarketSquare/SSHLibrary

Get Pre Login Banner always failing with FAIL : AttributeError: 'NoneType' object has no attribute 'decode'

Open
#437 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
167
Forks
145
PR merge metrics
No merged PRs in 30d

Description

Using Get Pre Login Banner with or without host name, always returns:
FAIL : AttributeError: 'NoneType' object has no attribute 'decode'

I don't know if this is because I am using a jump server to reach the server under test.

Robot Framework: 6.1.1
Python: 3.10.6
Host OS with Robot Framework : Debian bullseye/sid
Jump OS: CentOS Linux release 7.9.2009 (Core)
OS under test: Debian 9.13
SSHLibrary: 3.8.0

DEBUG loglevel:

20231128 11:05:35.495 :  FAIL : AttributeError: 'NoneType' object has no attribute 'decode'
20231128 11:05:35.495 : DEBUG : 
Traceback (most recent call last):
  File "/home/ibas/.local/lib/python3.10/site-packages/SSHLibrary/library.py", line 1125, in get_pre_login_banner
    return banner.decode(self.DEFAULT_ENCODING)
AttributeError: 'NoneType' object has no attribute 'decode'

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 in SSHLibrary/library.py at get_pre_login_banner around line 1125, then reproduce the keyword with and without a host name using the listed environment details. Compare the banner value returned in each case; done means the keyword no longer raises the reported NoneType.decode error and its behavior for an absent banner is verified.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
testing-qa
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.