• Immutable Page
  • Info
  • Attachments

EstadísticaDeEventos/ContadorDeVisitas

--> -->

UnicodeEncodeError

'decimal' codec can't encode character u'\x00' in position 0: invalid decimal Unicode string

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.

  1. /var/www/moin-test/MoinMoin/request.py in run (self=<MoinMoin.request.RequestFastCGI object>)

    1. 1023 # Visit pagename
    2. 1024 self.page = Page(self, pagename)
    3. 1025 self.page.send_page(self, count_hit=1)
    4. 1026
    5. 1027 # generate page footer (actions that do not want this footer
    • self = <MoinMoin.request.RequestFastCGI object>
    • self.page = <MoinMoin.Page.Page instance>
    • self.page.send_page = <bound method Page.send_page of <MoinMoin.Page.Page instance>>
    • count_hit undefined
  2. /var/www/moin-test/MoinMoin/Page.py in send_page (self=<MoinMoin.Page.Page instance>, request=<MoinMoin.request.RequestFastCGI object>, msg='', **keywords={'count_hit': 1})

    1. 1209 format_args=pi_formatargs,
    2. 1210 do_cache=do_cache,
    3. 1211 start_line=pi_lines)
    4. 1212
    5. 1213 # check for pending footnotes
    • start_line undefined
    • pi_lines = 8
  3. /var/www/moin-test/MoinMoin/Page.py in send_page_content (self=<MoinMoin.Page.Page instance>, request=<MoinMoin.request.RequestFastCGI object>, Parser=<class MoinMoin.parser.wiki.Parser>, body=u'[[StatsChart(hitcounts)]]\n', format_args=u'', do_cache=1, **kw={'start_line': 8})

    1. 1293 try:
    2. 1294 code = self.loadCache(request)
    3. 1295 self.execute(request, parser, code)
    4. 1296 except 'CacheNeedsUpdate':
    5. 1297 try:
    • self = <MoinMoin.Page.Page instance>
    • self.execute = <bound method Page.execute of <MoinMoin.Page.Page instance>>
    • request = <MoinMoin.request.RequestFastCGI object>
    • parser = <MoinMoin.parser.wiki.Parser instance>
    • code = <code object ? at 0x4718110, file "EstadísticaDeEventos/ContadorDeVisitas", line 2>
  4. /var/www/moin-test/MoinMoin/Page.py in execute (self=<MoinMoin.Page.Page instance>, request=<MoinMoin.request.RequestFastCGI object>, parser=<MoinMoin.parser.wiki.Parser instance>, code=<code object ? at 0x4718110, file "EstadísticaDeEventos/ContadorDeVisitas", line 2>)

    1. 1318 if hasattr(MoinMoin, '__loader__'):
    2. 1319 __file__ = os.path.join(MoinMoin.__loader__.archive, 'dummy')
    3. 1320 exec code
    4. 1321
    5. 1322 def loadCache(self, request):
    • code = <code object ? at 0x4718110, file "EstadísticaDeEventos/ContadorDeVisitas", line 2>
  5. /var/www/moin-test/wiki/server/EstadísticaDeEventos/ContadorDeVisitas in ?

  6. /var/www/moin-test/MoinMoin/formatter/base.py in macro (self=<MoinMoin.formatter.text_html.Formatter instance>, macro_obj=<MoinMoin.wikimacro.Macro instance>, name=u'StatsChart', args=u'hitcounts')

    1. 279 def macro(self, macro_obj, name, args):
    2. 280 # call the macro
    3. 281 return macro_obj.execute(name, args)
    4. 282
    5. 283 def _get_bang_args(self, line):
    • macro_obj = <MoinMoin.wikimacro.Macro instance>
    • macro_obj.execute = <bound method Macro.execute of <MoinMoin.wikimacro.Macro instance>>
    • name = u'StatsChart'
    • args = u'hitcounts'
  7. /var/www/moin-test/MoinMoin/wikimacro.py in execute (self=<MoinMoin.wikimacro.Macro instance>, macro_name=u'StatsChart', args=u'hitcounts')

    1. 118 else:
    2. 119 raise ImportError("Cannot load macro %s" % macro_name)
    3. 120 return execute(self, args)
    4. 121
    5. 122 def _m_lang(self, text):
    • execute = <function execute>
    • self = <MoinMoin.wikimacro.Macro instance>
    • args = u'hitcounts'
  8. /var/www/moin-test/MoinMoin/macro/StatsChart.py in execute (macro=<MoinMoin.wikimacro.Macro instance>, args=u'hitcounts', **kw={})

    1. 29 formatter.text(_('Bad chart type "%s"!') % args) +
    2. 30 formatter.sysmsg(0))
    3. 31
    4. 32 return func(macro.formatter.page.page_name, macro.request)
    5. 33
    • func = <function linkto>
    • macro = <MoinMoin.wikimacro.Macro instance>
    • macro.formatter = <MoinMoin.formatter.text_html.Formatter instance>
    • macro.formatter.page = <MoinMoin.Page.Page instance>
    • macro.formatter.page.page_name = u'Estad\xedsticaDeEventos/ContadorDeVisitas'
    • macro.request = <MoinMoin.request.RequestFastCGI object>
  9. /var/www/moin-test/MoinMoin/stats/hitcounts.py in linkto (pagename=u'Estad\xedsticaDeEventos/ContadorDeVisitas', request=<MoinMoin.request.RequestFastCGI object>, params='')

    1. 27 if not request.cfg.chart_options:
    2. 28 request.formatter = Formatter(request)
    3. 29 return text(pagename, request, params)
    4. 30
    5. 31 if _debug:
    • global text = <function text>
    • pagename = u'Estad\xedsticaDeEventos/ContadorDeVisitas'
    • request = <MoinMoin.request.RequestFastCGI object>
    • params = ''
  10. /var/www/moin-test/MoinMoin/stats/hitcounts.py in text (pagename=u'Estad\xedsticaDeEventos/ContadorDeVisitas', request=<MoinMoin.request.RequestFastCGI object>, params='')

    1. 147 filterpage = request.form['page'][0]
    2. 148
    3. 149 days, views, edits = get_data(pagename, request, filterpage)
    4. 150
    5. 151 hits = TupleDataset()
    • days undefined
    • views undefined
    • edits undefined
    • global get_data = <function get_data>
    • pagename = u'Estad\xedsticaDeEventos/ContadorDeVisitas'
    • request = <MoinMoin.request.RequestFastCGI object>
    • filterpage = None
  11. /var/www/moin-test/MoinMoin/stats/hitcounts.py in get_data (pagename=u'Estad\xedsticaDeEventos/ContadorDeVisitas', request=<MoinMoin.request.RequestFastCGI object>, filterpage=None)

    1. 82 if new_date is not None:
    2. 83 log.set_filter(['VIEWPAGE', 'SAVEPAGE'])
    3. 84 for event in log.reverse():
    4. 85 #print ">>>", wikiutil.escape(repr(event)), "<br>"
    5. 86
    • event = (1336161833538412L, u'VIEWPAGE', {'HTTP_USER_AGENT': u'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_3) A...KHTML, like Gecko) Version/5.1.3 Safari/534.53.10', 'REMOTE_ADDR': u'98.247.10.7', 'pagename': u'Linux Kernel Newbies'})
    • log = <MoinMoin.logfile.eventlog.EventLog instance>
    • log.reverse = <bound method EventLog.reverse of <MoinMoin.logfile.eventlog.EventLog instance>>
  12. /var/www/moin-test/MoinMoin/logfile/logfile.py in reverse (self=<MoinMoin.logfile.eventlog.EventLog instance>)

    1. 97 while 1:
    2. 98 try:
    3. 99 result = self.previous()
    4. 100 except StopIteration:
    5. 101 return
    • result = (1336161833538412L, u'VIEWPAGE', {'HTTP_USER_AGENT': u'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_3) A...KHTML, like Gecko) Version/5.1.3 Safari/534.53.10', 'REMOTE_ADDR': u'98.247.10.7', 'pagename': u'Linux Kernel Newbies'})
    • self = <MoinMoin.logfile.eventlog.EventLog instance>
    • self.previous = <bound method EventLog.previous of <MoinMoin.logfile.eventlog.EventLog instance>>
  13. /var/www/moin-test/MoinMoin/logfile/logfile.py in previous (self=<MoinMoin.logfile.eventlog.EventLog instance>)

    1. 292 while result == None:
    2. 293 while result == None:
    3. 294 result = self.__previous()
    4. 295 if self.filter and not self.filter(result):
    5. 296 result = None
    • result = None
    • self = <MoinMoin.logfile.eventlog.EventLog instance>
    • self.__previous undefined
  14. /var/www/moin-test/MoinMoin/logfile/logfile.py in __previous (self=<MoinMoin.logfile.eventlog.EventLog instance>)

    1. 282 def __previous(self):
    2. 283 if self.peek(-1): raise StopIteration
    3. 284 return self.parser(self.__buffer.lines[self.__rel_index])
    4. 285
    5. 286 def previous(self):
    • self = <MoinMoin.logfile.eventlog.EventLog instance>
    • self.parser = <bound method EventLog.parser of <MoinMoin.logfile.eventlog.EventLog instance>>
    • self.__buffer undefined
    • self.__rel_index undefined
  15. /var/www/moin-test/MoinMoin/logfile/eventlog.py in parser (self=<MoinMoin.logfile.eventlog.EventLog instance>, line=u'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00...ewbies.org/Linux_2_6_25&REMOTE_ADDR=59.57.14.123\n')

    1. 53 # badly formatted line in file, skip it
    2. 54 return None
    3. 55 return long(time_usecs), eventtype, wikiutil.parseQueryString(kvpairs)
    4. 56
    5. 57 def set_filter(self, event_types = None):
    • builtin long = <type 'long'>
    • time_usecs = u'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00...\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x001336161833451768'
    • eventtype = u'VIEWPAGE'
    • global wikiutil = <module 'MoinMoin.wikiutil' from '/var/www/moin-test/MoinMoin/wikiutil.pyc'>
    • wikiutil.parseQueryString = <function parseQueryString>
    • kvpairs = u'pagename=Linux+2+6+25&HTTP_USER_AGENT=Mozilla/5....newbies.org/Linux_2_6_25&REMOTE_ADDR=59.57.14.123'

UnicodeEncodeError

'decimal' codec can't encode character u'\x00' in position 0: invalid decimal Unicode string

  • args = ('decimal', u'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00...\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x001336161833451768', 0, 1, 'invalid decimal Unicode string')
  • encoding = 'decimal'
  • end = 1
  • object = u'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00...\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x001336161833451768'
  • reason = 'invalid decimal Unicode string'
  • start = 0

System Details