REG:AttributeError: 'NoneType' object has no attribute 'decode'

227 views
Skip to first unread message

supriya s

unread,
Nov 10, 2020, 3:15:04 AM11/10/20
to robotframework-users
while using  "GET Preloginbanner" keyword  i am getting below error
``````````````````````````````````````````````````````````````````````````````````````````````````
Testcase
   ${RemoteServer}=    openconnection    127.0.0.1    port=2123    
    Login    ubuntu    ubuntu
    ${banner} =    GET Preloginbanner    
    Log    ${banner}    
`````````````````````````````````````````````````````````````````````````````````````````````````````
Error:
``````````````````````````````````````````````````````````````````````````````````````````````````````
FAIL : AttributeError: 'NoneType' object has no attribute 'decode'
```````````````````````````````````````````````````````````````````````````````````````````````````````
can someone help solving this error.

Pekka Klärck

unread,
Nov 10, 2020, 3:54:02 AM11/10/20
to supriyal...@gmail.com, robotframework-users
Hi,

This sounds like a bug in the keyword you use. I don't know that
keyword, you didn't even tell thich library you use, so possibly you
are using it somehow wrong, but even in that case you should get a
better error message. To find out where in the keyword code the error
occurs, you can run tests with `--loglevel debug` that enables showing
failure tracebacks in the log file. If you don't then understand
what's going on, you need to contact the author of the library you are
using.

Cheers,
.peke

ti 10. marrask. 2020 klo 10.15 supriya s (supriyal...@gmail.com)
kirjoitti:
> --
> You received this message because you are subscribed to the Google Groups "robotframework-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-u...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/robotframework-users/329138e0-1960-45cd-a735-f1fa90e321afn%40googlegroups.com.



--
Agile Tester/Developer/Consultant :: http://eliga.fi
Lead Developer of Robot Framework :: http://robotframework.org

supriya s

unread,
Nov 10, 2020, 4:49:35 AM11/10/20
to robotframework-users
sorry i forgot to mention library it is SSHLibrary
i added  loglevel as TRACE 

````````````````````````````````````````````````````````````````````````````````````````
*** Settings ***
Library           SSHLibrary

Testcase
   ${RemoteServer}=    openconnection    127.0.0.1    port=2123    
    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
``````````````````````````````````````````````````````````````````````````````````````````




Pekka Klärck

unread,
Nov 10, 2020, 4:59:04 AM11/10/20
to supriyal...@gmail.com, robotframework-users
Hi,

Based on the traceback the `banner` variable is `None` but I don't
know why that happens. You should submit an issue about this to
SSHLibrary's issue tracker. if possible, include an example that can
be used to demonstrate the problem in the report.

Cheers,
.peke

ti 10. marrask. 2020 klo 11.49 supriya s (supriyal...@gmail.com)
kirjoitti:
> To view this discussion on the web visit https://groups.google.com/d/msgid/robotframework-users/5a661e27-8fc0-4b54-876e-acaf8b0b4118n%40googlegroups.com.

supriya s

unread,
Nov 10, 2020, 5:36:05 AM11/10/20
to robotframework-users
kindly let me know  issue tracker  path   ,i dont know  it.



Reply all
Reply to author
Forward
0 new messages