Ввод-вывод Unicode текста
Quick and dirty way
Воспользоваться следующими функциями:
--> -->ImportError
No module named pygments
If you want to report a bug, please save this page and attach it to your bug report.
Traceback
A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred.
/usr/lib/python2.5/site-packages/MoinMoin/request.py in run (self=<MoinMoin.request.RequestCGI object at 0x82d45cc>)
- 1205 self.page.send_page(self, msg=msg)
- 1206 else:
- 1207 handler(self.page.page_name, self)
- 1208
- 1209 # generate page footer (actions that do not want this footer use
- handler = <function do_show at 0x84adb54>
- self = <MoinMoin.request.RequestCGI object at 0x82d45cc>
- self.page = <MoinMoin.Page.Page instance at 0x849d4cc>
- self.page.page_name = u'Haskell FAQ'
/usr/lib/python2.5/site-packages/MoinMoin/wikiaction.py in do_show (pagename=u'Haskell FAQ', request=<MoinMoin.request.RequestCGI object at 0x82d45cc>)
- 466 else:
- 467 request.cacheable = 1
- 468 Page(request, pagename).send_page(request, count_hit=1)
- 469
- 470
- global Page = <class MoinMoin.Page.Page at 0x849459c>
- request = <MoinMoin.request.RequestCGI object at 0x82d45cc>
- pagename = u'Haskell FAQ'
- ).send_page undefined
- count_hit undefined
/usr/lib/python2.5/site-packages/MoinMoin/Page.py in send_page (self=<MoinMoin.Page.Page instance at 0x85373ac>, request=<MoinMoin.request.RequestCGI object at 0x82d45cc>, msg='', **keywords={'count_hit': 1})
- 1254 format_args=pi_formatargs,
- 1255 do_cache=do_cache,
- 1256 start_line=pi_lines)
- 1257
- 1258 # check for pending footnotes
- start_line undefined
- pi_lines = 0
/usr/lib/python2.5/site-packages/MoinMoin/Page.py in send_page_content (self=<MoinMoin.Page.Page instance at 0x85373ac>, request=<MoinMoin.request.RequestCGI object at 0x82d45cc>, Parser=<class MoinMoin.parser.wiki.Parser at 0x86ca4ac>, body=u'== \u0412\u0432\u043e\u0434-\u0432\u044b\u0432\u043e\u0434 Unicode \u0442\u0435\u043a\u0441\u0442\u0430 ==\n=== Quick and di...askell-unicode-support.html \u0432\u043e\u0442 \u044d\u0442\u043e\u0442] \u0431\u043b\u043e\u0433 \u043f\u043e\u0441\u0442.\n', format_args='', do_cache=1, **kw={'start_line': 0})
- 1345 try:
- 1346 code = self.loadCache(request)
- 1347 self.execute(request, parser, code)
- 1348 except Exception, e:
- 1349 if not is_cache_exception(e):
- self = <MoinMoin.Page.Page instance at 0x85373ac>
- self.execute = <bound method Page.execute of <MoinMoin.Page.Page instance at 0x85373ac>>
- request = <MoinMoin.request.RequestCGI object at 0x82d45cc>
- parser = <MoinMoin.parser.wiki.Parser instance at 0x8532f0c>
- code = <code object <module> at 0x86c7b60, file "Haskell FAQ", line 2>
/usr/lib/python2.5/site-packages/MoinMoin/Page.py in execute (self=<MoinMoin.Page.Page instance at 0x85373ac>, request=<MoinMoin.request.RequestCGI object at 0x82d45cc>, parser=<MoinMoin.parser.wiki.Parser instance at 0x8532f0c>, code=<code object <module> at 0x86c7b60, file "Haskell FAQ", line 2>)
- 1374 __file__ = os.path.join(MoinMoin.__loader__.archive, 'dummy')
- 1375 try:
- 1376 exec code
- 1377 except 'CacheNeedsUpdate':
- 1378 raise Exception('CacheNeedsUpdate')
- code = <code object <module> at 0x86c7b60, file "Haskell FAQ", line 2>
/var/spool/wiki/spbhug/cgi-bin/Haskell FAQ in
() /usr/lib/python2.5/site-packages/MoinMoin/formatter/base.py in processor (self=<MoinMoin.formatter.text_html.Formatter instance at 0x866b04c>, processor_name=u'code', lines=[u'#!code haskell', u'module UTF8 where', u'', u'-- From the Char module supplied with HBC.', u'', u'-- Take a Unicode string and encode it as a string', u'-- with the UTF8 method.', u'decodeUTF8 :: String -> String', u'decodeUTF8 "" = ""', rudecodeUTF8 (c:cs) | c < '\x80' = c : decodeUTF8 csu, rudecodeUTF8 (c:c':cs) | '\xc0' <= c && c <= '\xdf' &&u, ru '\x80' <= c' && c' <= '\xbf' =u, u" toEnum ((fromEnum c `mod` 0x20) * 0x40 + fromEnum c' `mod` 0x40) : decodeUTF8 cs", rudecodeUTF8 (c:c':c'':cs) | '\xe0' <= c && c <= '\xef' &&u, ru '\x80' <= c' && c' <= '\xbf' &&u, ru '\x80' <= c'' && c'' <= '\xbf' =u, u" toEnum ((fromEnum c `mod` 0x10 * 0x1000)...* 0x40 + fromEnum c'' `mod` 0x40) : decodeUTF8 cs", u'decodeUTF8 _ = error "UniChar.decodeUTF8: bad data"', u'', u'encodeUTF8 :: String -> String', ...], is_parser=1)
- 310 else:
- 311 parser = wikiutil.importPlugin(self.request.cfg, "parser",
- 312 processor_name, "Parser")
- 313 args = self._get_bang_args(lines[0])
- 314 if args is not None:
- processor_name = u'code'
/usr/lib/python2.5/site-packages/MoinMoin/wikiutil.py in importPlugin (cfg=<wikiconfig.Config instance at 0x846838c>, kind='parser', name=u'code', function='Parser')
- 802 """
- 803 try:
- 804 return importWikiPlugin(cfg, kind, name, function)
- 805 except PluginMissingError:
- 806 return importBuiltinPlugin(kind, name, function)
- global importWikiPlugin = <function importWikiPlugin at 0x83de9cc>
- cfg = <wikiconfig.Config instance at 0x846838c>
- kind = 'parser'
- name = u'code'
- function = 'Parser'
/usr/lib/python2.5/site-packages/MoinMoin/wikiutil.py in importWikiPlugin (cfg=<wikiconfig.Config instance at 0x846838c>, kind='parser', name=u'code', function='Parser')
- 815 raise PluginMissingError
- 816 moduleName = '%s.plugin.%s.%s' % (cfg.siteid, kind, name)
- 817 return importNameFromPlugin(moduleName, function)
- 818
- 819
- global importNameFromPlugin = <function importNameFromPlugin at 0x83dea3c>
- moduleName = u'wikiconfig.plugin.parser.code'
- function = 'Parser'
/usr/lib/python2.5/site-packages/MoinMoin/wikiutil.py in importNameFromPlugin (moduleName=u'wikiconfig.plugin.parser.code', name='Parser')
- 834 Raise PluginAttributeError if name does not exists.
- 835 """
- 836 module = __import__(moduleName, globals(), {}, [name])
- 837 try:
- 838 return getattr(module, name)
- module undefined
- builtin __import__ = <built-in function __import__>
- moduleName = u'wikiconfig.plugin.parser.code'
- builtin globals = <built-in function globals>
- name = 'Parser'
/var/spool/wiki/spbhug/data/plugin/parser/code.py in
() - 49 import sys
- 50
- 51 from pygments import highlight
- 52 from pygments.lexers import get_lexer_by_name, get_lexer_for_filename, TextLexer
- 53 from pygments.formatters import HtmlFormatter
- pygments undefined
- highlight undefined
ImportError
No module named pygments
- args = ('No module named pygments',)
- message = 'No module named pygments'
System Details
- Date: Thu, 09 Sep 2010 18:39:27 +0000
- Platform: Linux trekker 2.6.26-1-686 #1 SMP Fri Mar 13 18:08:45 UTC 2009 i686
- Python: Python 2.5.2 (/usr/bin/python)
- MoinMoin: Release 1.5.9 (release)
