sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #10964
[Bug 1009596] Re: AttributeError on formatting XML log
Maybe this is an external library that sikuli-script.jar decides to
package on its own. I just downloaded Sikuli-X-1.0rc3
(r905)-osx-10.6.dmg for Snow Leopard/Lion (OS X 10.6/10.7). After
drilling down into the Sikuli-IDE package contents, I can find the
minidom.py class at the following path:
/Applications/Sikuli-
IDE.app/Contents/Resources/Java/Lib/xml/dom/minidom.py
If this isn't a Sikuli class that is maintained here, can you point me
toward the 3rd party responsible for maintaining this piece of code? I'd
like to try to track down this bug and solve it in the project's code
base, instead of having to maintain our own separate build of Sikuli
which is likely to be overwritten in the future.
Thanks!
--
You received this bug notification because you are a member of Sikuli
Drivers, which is subscribed to Sikuli.
https://bugs.launchpad.net/bugs/1009596
Title:
AttributeError on formatting XML log
Status in Sikuli:
Opinion
Bug description:
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.
To manage notifications about this bug go to:
https://bugs.launchpad.net/sikuli/+bug/1009596/+subscriptions
References