Open GoogleCodeExporter opened 9 years ago
странно, написал print doc перед выводом в htmlview,
вроде оно там есть и вроде правильное,
но все равно:
''''<body><br/><p style='background-color: #ccc0a9; font-weight: bold;
text-align:
center'>Oxford_Talking_Dictionary.en-en</p><br/>s-mine [<a href="#slen:
s-mine"><span
style='font-size: 150%'>♫</span></a>] \n<span style='font-weight: bold'>
•s-mine•
</span>\n/<span style='color:#0A7700'> •"ɛsmʌɪn• </span>/\n<span
style='font-style: italic'>
<span style='color:#0A7700'> <span style='color:#0A7700'> n. </span> </span>
</span> •m20•.
[abbrev. of g <span style='font-style: italic'> <span style='color:#0A7700'>
schützenmine
</span> </span> lit. ‘infantryman mine’.] a german anti-personnel mine used
in the war of
1939–45.
<br/></body>'''
Traceback (most recent call last):
File "/usr/lib/pymodules/python2.6/slog/plugins.py", line 249, in __set_translate
tv.set_translate(word, translate)
File "/usr/lib/pymodules/python2.6/slog/TransPanel.py", line 90, in set_translate
self.htmlview.display_html(doc)
File "/usr/lib/pymodules/python2.6/htmltextview.py", line 511, in display_html
parser.parse(StringIO(html))
File "/usr/lib/python2.6/xml/sax/expatreader.py", line 107, in parse
xmlreader.IncrementalParser.parse(self, source)
File "/usr/lib/python2.6/xml/sax/xmlreader.py", line 123, in parse
self.feed(buffer)
File "/usr/lib/python2.6/xml/sax/expatreader.py", line 211, in feed
self._err_handler.fatalError(exc)
File "/usr/lib/python2.6/xml/sax/handler.py", line 38, in fatalError
raise exception
xml.sax._exceptions.SAXParseException: <unknown>:1:1: not well-formed (invalid
token)
Original comment by nbdar...@gmail.com
on 24 Apr 2010 at 2:38
print "''''"+doc+"'''"
#self.htmlview.display_html(doc)
self.htmlview.display_html("""<body><br/><p style='background-color: #ccc0a9;
font-weight: bold; text-align:
center'>Oxford_Talking_Dictionary.en-en</p><br/>s-mine [<a
href=\"#slen: s-mine\"><span style='font-size: 150%'>♫</span></a>] \n<span
style='font-
weight: bold'> •s-mine• </span>/<span style='color:#0A7700'>
•\"ɛsmʌɪn• </span>/<span
style='font-style: italic'> <span style='color:#0A7700'> <span
style='color:#0A7700'> n.
</span> </span> </span> •m20•. [abbrev. of g <span style='font-style:
italic'> <span
style='color:#0A7700'> schützenmine </span> </span> lit. ‘infantryman
mine’.] a german anti-
personnel mine used in the war of 1939–45.
<br/></body>""")
вот так показывает, а с self.htmlview.display_html(doc) не
показывает и ругается, хотя по
идее в переменной все тоже самое
содержится. странно
Original comment by nbdar...@gmail.com
on 24 Apr 2010 at 2:50
походу проблема в невидимых и некопируемых
юникодных символах которые не нравятся
парсеру. не
удалось мне решить ее что то
Original comment by nbdar...@gmail.com
on 24 Apr 2010 at 3:17
Original comment by renatn
on 8 Jun 2010 at 1:56
Original issue reported on code.google.com by
nbdar...@gmail.com
on 24 Apr 2010 at 2:04