sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #11012
[Question #199996]: AttributeError on formatting XML log
New question #199996 on Sikuli:
https://answers.launchpad.net/sikuli/+question/199996
Version: X-1.0rc3
OS: Mac OSX 10.7.3 (bug)
Non-String types can be passed in to minidom.py class's "_write_data(writer, data)" method within the sikuli-script.jar package. At runtime, this will result in an AttributeError being thrown. In our case, the log file that was being formatted to "pretty xml" was lost.
As a workaround/fix, we altered lines 306 & 307 in this file from:
data = data.replace("&", "&").replace("<", "<")
data = data.replace("\"", """).replace(">", ">")
to the following:
data = str(data).replace("&", "&").replace("<", "<")
data = str(data).replace("\"", """).replace(">", ">")
This fixed the runtime exception we noticed when "data" was somehow cast to an "int" at the time this method was being called. Seemed like a decent fix, so I thought I'd file a bug to see what other people thought and maybe help others avoid a similar issue in the future.
Strangely enough, we were not able to reproduce this bug on Windows7 64-bit OS - running the same Sikuli code/automation.
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.