Why call attribute 'upper'?

796 views
Skip to first unread message

Neil

unread,
Apr 17, 2012, 2:30:43 AM4/17/12
to robotframe...@googlegroups.com
Hi, all:
   my test failed and reported "AttributeError: 'AccPort' object has no attribute 'upper'"
   but I have not called a attribute 'upper'?
   Anyone have some idea about it?
   Thanks!

# pybot ecpa2.html
==============================================================================
Ecpa2                                                                        
==============================================================================
EPL Flow                                                              | FAIL |
AttributeError: 'AccPort' object has no attribute 'upper'
------------------------------------------------------------------------------
Ecpa2                                                                 | FAIL |
1 critical test, 0 passed, 1 failed
1 test total, 0 passed, 1 failed
==============================================================================
Output:  /home/share/andrew/python/robot/output.xml
Log:     /home/share/andrew/python/robot/log.html
Report:  /home/share/andrew/python/robot/report.html

Pekka Klärck

unread,
Apr 17, 2012, 2:37:06 AM4/17/12
to xuron...@gmail.com, robotframe...@googlegroups.com
2012/4/17 Neil <xuron...@gmail.com>:

> Hi, all:
>    my test failed and reported "AttributeError: 'AccPort' object has no
> attribute 'upper'"
>    but I have not called a attribute 'upper'?
>    Anyone have some idea about it?

There's most likely a bug in a test library you use. It could also be
that you are passing an invalid argument to a keyword, but even in
that case the keyword could report the error better. Run the test with
`--loglevel debug` command line option and you'll see a traceback that
shows where in the library code the error occurs. If you don't know
much Python, you may need to consult someone who knows it, preferably
the library developer, for more information.

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

Message has been deleted
Message has been deleted

Neil

unread,
Apr 17, 2012, 3:25:02 AM4/17/12
to robotframe...@googlegroups.com, xuron...@gmail.com
Hi, Pekka:
   Thanks, Import as following:
   Import Library    snmp_lib.Flow    ${I_HOST100PORT3}    cmflowtype=epl
  
   It seems there is a bug about robot framework.
   ${I_HOST100PORT3} is a instance of a class. The class do not have attribute 'upper', but  robot framework try to use it attribute 'upper'.
  
  
   debug show following info:
  
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/robot/libraries/BuiltIn.py", line 1543, in import_library
    self._namespace.import_library(name.replace('/', os.sep), list(args))
  File "/usr/lib/python2.6/site-packages/robot/running/namespace.py", line 121, in import_library
    self._import_library(Library(None, name, args=args, alias=alias), variables)
  File "/usr/lib/python2.6/site-packages/robot/parsing/settings.py", line 247, in __init__
    args, alias = self._split_alias(args)
  File "/usr/lib/python2.6/site-packages/robot/parsing/settings.py", line 251, in _split_alias
    if len(args) >= 2 and args[-2].upper() == 'WITH NAME':

在 2012年4月17日星期二UTC+8下午2时37分06秒,Pekka Klärck写道:

Pekka Klärck

unread,
Apr 17, 2012, 3:28:12 PM4/17/12
to xuron...@gmail.com, robotframe...@googlegroups.com
2012/4/17 Neil <xuron...@gmail.com>:

> Hi, Pekka:
>    Thanks, Import as following:
>    Import Library    snmp_lib.Flow    ${I_HOST100PORT3}    cmflowtype=epl
>
>    It seems there is a bug about robot framework.
>    ${I_HOST100PORT3} is a instance of a class. The class do not have
> attribute 'upper', but  robot framework try to use it attribute 'upper'.

Yes, the bug is in Robot Framework itself. I submitted an issue about
it and the bug will be fixed in RF 2.7.2. The issue also lists some
workarounds that you may want to try:
http://code.google.com/p/robotframework/issues/detail?id=1110

Thanks for reporting the issue!

Reply all
Reply to author
Forward
0 new messages