ldtri0209 / robotframework

Automatically exported from code.google.com/p/robotframework
Apache License 2.0
0 stars 0 forks source link

Unicode object has no attribute decode #676

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I am using RIDE 0.28 on Python 2.5.4 to create my test cases.
However, I am running those testcases using Robot 2.1.3 
Robot Framework 2.1.3 (Python 2.3.5 on win32)
I am having problems importing the Resource file and I get the following 
message:
[ ERROR ] Error in file 'c:\testing\automation\robot\xxxxx\xxxxx.html' in table 
'Setting' in element on row 4: AttributeError: 'unicode' object has no attr
ibute 'decode'
All I am doing in the Resource file is importing a single library:
Library | <library name>
I am aware that I am using different versions of RIDE to Robot, but at the 
moment I don't have a choice and I haven't come accross any incompatibilities.

Many thanks

Original issue reported on code.google.com by spectest...@googlemail.com on 29 Sep 2010 at 9:08

GoogleCodeExporter commented 9 years ago
Is this error visible only in the console or also in the log file? Does the 
error crash the whole execution?

Do you got any more information than the error message? Seeing the stacktrace 
would help us understand where in the code the problem occurs. If you don't see 
the stacktrace otherwise, could you enable syslog [1] and see is anything 
interesting written there?

[1] 
http://robotframework.googlecode.com/svn/tags/robotframework-2.5.4/doc/userguide
/RobotFrameworkUserGuide.html#system-log

Original comment by pekka.klarck on 29 Sep 2010 at 10:16

GoogleCodeExporter commented 9 years ago
Hello,
Many thanks for getting back to me so quickly.
The error is not crashing the execution and I am able to run a whole suite 
(project) ,howeverI was hoping to import a Resource file (library) on the top 
level Suite (project)  so that I can make calls to it from suites/tests below. 
The workaround is the import library to each individual suite in the project 
(top level suite), so that those suites/tests can access it.

I've turned on logging with syslog, but haven't managed to get any additional 
information from the log file:
| ERROR | Error in file 
'c:\testing\automation\robot\xxxxxxx_suite\__init__.html' in table 'Setting' in 
element on row 4: AttributeError: 'unicode' object has no attribute 'decode'
20100929 11:43:15.546 | INFO  | Started test suite

Message does show up in the console.
Pybot command is: >pybot -d C:\Temp -L DEBUG 
C:\Testing\Automation\Robot\xxxxxxx_Suite (where xxxxxx_Suite is the directory 
where all my test files are (.html) + __init__.html and a single Resource 
file(.html)

Thanks

Original comment by spectest...@googlemail.com on 29 Sep 2010 at 11:02

GoogleCodeExporter commented 9 years ago
Could you try setting syslog level to debug and see is the stacktrace written 
to syslog then?

Notice also that keywords and variables created or imported in __init__ files 
are not available in lower level test suites.

Original comment by pekka.klarck on 29 Sep 2010 at 2:27

GoogleCodeExporter commented 9 years ago
syslog has been set to debug and the output was the same as in the console 
(just the Error as posted above). Although I was hoping that I will be able 
import resource file on the top level (to use in lower cases), even when I add 
resource on the lower suite level I get the same error message as on the top 
level.

Thanks

Original comment by spectest...@googlemail.com on 29 Sep 2010 at 3:33

GoogleCodeExporter commented 9 years ago
Could you create a simple example demonstrating this problem and attach it here?

Original comment by pekka.klarck on 29 Sep 2010 at 11:32

GoogleCodeExporter commented 9 years ago
Could you also try running tests with RF 2.5.4? We have fixed several Unicode 
related bugs in the framework itself in 2.5.x releases.

Notice that this issue will be closed if we don't get more information soonish.

Original comment by pekka.klarck on 2 Dec 2010 at 7:49

GoogleCodeExporter commented 9 years ago
The requirement is to use RF 2.1.3 as it supports Python 2.3 which in turn is 
the version that app under the test is using. Feel free to close this issue as 
I have found
workaround and should the exception reoccur I will raise a new issue.
Many thanks

Original comment by spectest...@googlemail.com on 3 Dec 2010 at 1:56

GoogleCodeExporter commented 9 years ago
There's nothing we can do to this without more information. It's also possible 
that the underlying problem has already been fixed after 2.1.3.

Original comment by pekka.klarck on 9 Dec 2010 at 10:49