--> -->

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/lib/python-support/python2.5/MoinMoin/request.py in run (self=<MoinMoin.request.RequestModPy object at 0x93ed8ac>)

    1. 1205 self.page.send_page(self, msg=msg)
    2. 1206 else:
    3. 1207 handler(self.page.page_name, self)
    4. 1208
    5. 1209 # generate page footer (actions that do not want this footer use
    • handler = <function do_show at 0x8e3a3e4>
    • self = <MoinMoin.request.RequestModPy object at 0x93ed8ac>
    • self.page = <MoinMoin.Page.Page instance at 0x93ca5cc>
    • self.page.page_name = u'EventStats/HitCounts'
  2. /var/lib/python-support/python2.5/MoinMoin/wikiaction.py in do_show (pagename=u'EventStats/HitCounts', request=<MoinMoin.request.RequestModPy object at 0x93ed8ac>)

    1. 466 else:
    2. 467 request.cacheable = 1
    3. 468 Page(request, pagename).send_page(request, count_hit=1)
    4. 469
    5. 470
    • global Page = <class MoinMoin.Page.Page at 0x8e25cbc>
    • request = <MoinMoin.request.RequestModPy object at 0x93ed8ac>
    • pagename = u'EventStats/HitCounts'
    • ).send_page undefined
    • count_hit undefined
  3. /var/lib/python-support/python2.5/MoinMoin/Page.py in send_page (self=<MoinMoin.Page.Page instance at 0x93ca0cc>, request=<MoinMoin.request.RequestModPy object at 0x93ed8ac>, msg='', **keywords={'count_hit': 1})

    1. 1254 format_args=pi_formatargs,
    2. 1255 do_cache=do_cache,
    3. 1256 start_line=pi_lines)
    4. 1257
    5. 1258 # check for pending footnotes
    • start_line undefined
    • pi_lines = 7
  4. /var/lib/python-support/python2.5/MoinMoin/Page.py in send_page_content (self=<MoinMoin.Page.Page instance at 0x93ca0cc>, request=<MoinMoin.request.RequestModPy object at 0x93ed8ac>, Parser=<class MoinMoin.parser.wiki.Parser at 0x91515fc>, body=u'[[StatsChart(hitcounts)]]\n', format_args=u'', do_cache=1, **kw={'start_line': 7})

    1. 1345 try:
    2. 1346 code = self.loadCache(request)
    3. 1347 self.execute(request, parser, code)
    4. 1348 except Exception, e:
    5. 1349 if not is_cache_exception(e):
    • self = <MoinMoin.Page.Page instance at 0x93ca0cc>
    • self.execute = <bound method Page.execute of <MoinMoin.Page.Page instance at 0x93ca0cc>>
    • request = <MoinMoin.request.RequestModPy object at 0x93ed8ac>
    • parser = <MoinMoin.parser.wiki.Parser instance at 0x93ca60c>
    • code = <code object <module> at 0x9634608, file "EventStats/HitCounts", line 2>
  5. /var/lib/python-support/python2.5/MoinMoin/Page.py in execute (self=<MoinMoin.Page.Page instance at 0x93ca0cc>, request=<MoinMoin.request.RequestModPy object at 0x93ed8ac>, parser=<MoinMoin.parser.wiki.Parser instance at 0x93ca60c>, code=<code object <module> at 0x9634608, file "EventStats/HitCounts", line 2>)

    1. 1374 __file__ = os.path.join(MoinMoin.__loader__.archive, 'dummy')
    2. 1375 try:
    3. 1376 exec code
    4. 1377 except 'CacheNeedsUpdate':
    5. 1378 raise Exception('CacheNeedsUpdate')
    • code = <code object <module> at 0x9634608, file "EventStats/HitCounts", line 2>
  6. /EventStats/HitCounts in ()

  7. /var/lib/python-support/python2.5/MoinMoin/formatter/base.py in macro (self=<MoinMoin.formatter.text_html.Formatter instance at 0x93c0a4c>, macro_obj=<MoinMoin.wikimacro.Macro instance at 0x93c0e8c>, name=u'StatsChart', args=u'hitcounts')

    1. 288 def macro(self, macro_obj, name, args):
    2. 289 # call the macro
    3. 290 return macro_obj.execute(name, args)
    4. 291
    5. 292 def _get_bang_args(self, line):
    • macro_obj = <MoinMoin.wikimacro.Macro instance at 0x93c0e8c>
    • macro_obj.execute = <bound method Macro.execute of <MoinMoin.wikimacro.Macro instance at 0x93c0e8c>>
    • name = u'StatsChart'
    • args = u'hitcounts'
  8. /var/lib/python-support/python2.5/MoinMoin/wikimacro.py in execute (self=<MoinMoin.wikimacro.Macro instance at 0x93c0e8c>, 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 at 0x917517c>
    • self = <MoinMoin.wikimacro.Macro instance at 0x93c0e8c>
    • args = u'hitcounts'
  9. /var/lib/python-support/python2.5/MoinMoin/macro/StatsChart.py in execute (macro=<MoinMoin.wikimacro.Macro instance at 0x93c0e8c>, 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 at 0x92d4a74>
    • macro = <MoinMoin.wikimacro.Macro instance at 0x93c0e8c>
    • macro.formatter = <MoinMoin.formatter.text_html.Formatter instance at 0x93c0a4c>
    • macro.formatter.page = <MoinMoin.Page.Page instance at 0x93ca0cc>
    • macro.formatter.page.page_name = u'EventStats/HitCounts'
    • macro.request = <MoinMoin.request.RequestModPy object at 0x93ed8ac>
  10. /var/lib/python-support/python2.5/MoinMoin/stats/hitcounts.py in linkto (pagename=u'EventStats/HitCounts', request=<MoinMoin.request.RequestModPy object at 0x93ed8ac>, 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 at 0x92de0d4>
    • pagename = u'EventStats/HitCounts'
    • request = <MoinMoin.request.RequestModPy object at 0x93ed8ac>
    • params = ''
  11. /var/lib/python-support/python2.5/MoinMoin/stats/hitcounts.py in text (pagename=u'EventStats/HitCounts', request=<MoinMoin.request.RequestModPy object at 0x93ed8ac>, 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 at 0x92d4534>
    • pagename = u'EventStats/HitCounts'
    • request = <MoinMoin.request.RequestModPy object at 0x93ed8ac>
    • filterpage = None
  12. /var/lib/python-support/python2.5/MoinMoin/stats/hitcounts.py in get_data (pagename=u'EventStats/HitCounts', request=<MoinMoin.request.RequestModPy object at 0x93ed8ac>, 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 = (1641781990395630L, u'VIEWPAGE', {'HTTP_REFERER': u'https://bjdean.id.au/', 'HTTP_USER_AGENT': u'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.....181 Chrome/65.0.3325.181 Safari/537.36,gzip(gfe)', 'REMOTE_ADDR': u'107.189.171.42', 'pagename': u'frontpage'})
    • log = <MoinMoin.logfile.eventlog.EventLog instance at 0x8c8584c>
    • log.reverse = <bound method EventLog.reverse of <MoinMoin.logfile.eventlog.EventLog instance at 0x8c8584c>>
  13. /var/lib/python-support/python2.5/MoinMoin/logfile/logfile.py in reverse (self=<MoinMoin.logfile.eventlog.EventLog instance at 0x8c8584c>)

    1. 97 while 1:
    2. 98 try:
    3. 99 result = self.previous()
    4. 100 except StopIteration:
    5. 101 return
    • result = (1641781990395630L, u'VIEWPAGE', {'HTTP_REFERER': u'https://bjdean.id.au/', 'HTTP_USER_AGENT': u'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.....181 Chrome/65.0.3325.181 Safari/537.36,gzip(gfe)', 'REMOTE_ADDR': u'107.189.171.42', 'pagename': u'frontpage'})
    • self = <MoinMoin.logfile.eventlog.EventLog instance at 0x8c8584c>
    • self.previous = <bound method EventLog.previous of <MoinMoin.logfile.eventlog.EventLog instance at 0x8c8584c>>
  14. /var/lib/python-support/python2.5/MoinMoin/logfile/logfile.py in previous (self=<MoinMoin.logfile.eventlog.EventLog instance at 0x8c8584c>)

    1. 287 while result == None:
    2. 288 while result == None:
    3. 289 result = self.__previous()
    4. 290 if self.filter and not self.filter(result):
    5. 291 result = None
    • result = None
    • self = <MoinMoin.logfile.eventlog.EventLog instance at 0x8c8584c>
    • self.__previous undefined
  15. /var/lib/python-support/python2.5/MoinMoin/logfile/logfile.py in __previous (self=<MoinMoin.logfile.eventlog.EventLog instance at 0x8c8584c>)

    1. 277 def __previous(self):
    2. 278 if self.peek(-1): raise StopIteration
    3. 279 return self.parser(self.__buffer.lines[self.__rel_index])
    4. 280
    5. 281 def previous(self):
    • self = <MoinMoin.logfile.eventlog.EventLog instance at 0x8c8584c>
    • self.parser = <bound method EventLog.parser of <MoinMoin.logfile.eventlog.EventLog instance at 0x8c8584c>>
    • self.__buffer undefined
    • self.__rel_index undefined
  16. /var/lib/python-support/python2.5/MoinMoin/logfile/eventlog.py in parser (self=<MoinMoin.logfile.eventlog.EventLog instance at 0x8c8584c>, 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...ttp%3A//bjdean.id.au/&REMOTE_ADDR=209.127.28.220\n')

    1. 52 # badly formatted line in file, skip it
    2. 53 return None
    3. 54 return long(time_usecs), eventtype, wikiutil.parseQueryString(kvpairs)
    4. 55
    5. 56 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\x001641781669848531'
    • eventtype = u'VIEWPAGE'
    • global wikiutil = <module 'MoinMoin.wikiutil' from '/var/lib/python-support/python2.5/MoinMoin/wikiutil.py'>
    • wikiutil.parseQueryString = <function parseQueryString at 0x8c33224>
    • kvpairs = u'pagename=FrontPage&HTTP_USER_AGENT=Mozilla/5.0+%...http%3A//bjdean.id.au/&REMOTE_ADDR=209.127.28.220'

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\x001641781669848531', 0, 1, 'invalid decimal Unicode string')
  • encoding = 'decimal'
  • end = 1
  • message = ''
  • 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\x001641781669848531'
  • reason = 'invalid decimal Unicode string'
  • start = 0

System Details

  • Date: Mon, 01 May 2023 14:18:32 +0000
  • Platform: Linux bradtest.info 3.10.0-1160.21.1.vz7.174.13 #1 SMP Thu Apr 22 16:18:59 MSK 2021 i686
  • Python: Python 2.5.2 (/usr/bin/python)
  • MoinMoin: Release 1.5.8 (release)