简体   繁体   中英

AttributeError: 'NoneType' object has no attribute 'decode' in robot framework

while using "GetPreLoginBanner" keyword i am getting below error

*** Settings ***
Library           SSHLibrary

Testcase
   ${RemoteServer}=    openconnection    127.0.0.1    port=2424    
    Login    ubuntu    ubuntu
    ${banner} =    GetPreLoginBanner    
    Log    ${banner}    

Error:

FAIL : AttributeError: 'NoneType' object has no attribute 'decode'
Traceback (most recent call last):
  File "c:\python27\lib\site-packages\SSHLibrary\library.py", line 1005, in get_pre_login_banner
    return banner.decode(self.DEFAULT_ENCODING)
Ending test:   Hits.Builtkeys.SSHLibrary.LoginBanner

can someone help solving this error.

This looks like a bug in SSHLibrary. It's assuming that banner is some sort of string, but in this specific case it's None .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM