--> -->

UnicodeDecodeError

'utf8' codec can't decode bytes in position 15-16: unexpected end of data

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. c:\Python24\Lib\site-packages\MoinMoin\request.py in run (self=<MoinMoin.request.RequestModPy object>)

    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 execute>
    • self = <MoinMoin.request.RequestModPy object>
    • self.page = <MoinMoin.Page.Page instance>
    • self.page.page_name = u'\u5185\u5b58\u7ba1\u7406'
  2. C:\Python24\lib\site-packages\MoinMoin\action\AttachFile.py in execute (pagename=u'\u5185\u5b58\u7ba1\u7406', request=<MoinMoin.request.RequestModPy object>)

    1. 479 if request.user.may.write(pagename):
    2. 480 if request.form.has_key('file'):
    3. 481 do_upload(pagename, request)
    4. 482 else:
    5. 483 # This might happen when trying to upload file names
    • global do_upload = <function do_upload>
    • pagename = u'\u5185\u5b58\u7ba1\u7406'
    • request = <MoinMoin.request.RequestModPy object>
  3. C:\Python24\lib\site-packages\MoinMoin\action\AttachFile.py in do_upload (pagename=u'\u5185\u5b58\u7ba1\u7406', request=<MoinMoin.request.RequestModPy object>)

    1. 630
    2. 631 # return attachment list
    3. 632 upload_form(pagename, request, msg)
    4. 633
    5. 634
    • global upload_form = <function upload_form>
    • pagename = u'\u5185\u5b58\u7ba1\u7406'
    • request = <MoinMoin.request.RequestModPy object>
    • msg = u"\u9644\u4ef6'\u8fd9\u662f\u4e00\u4e2a\u9644\u4ef6'(\u8fdc\u7aef\u540d\u79f0'E:\\Documents and Settings\\yin ze hong\\My Pictures\\icon\\vivian.JPG')\u5df2\u4e0a\u8f7d, \u5171\u8ba121031\u5b57\u8282."
  4. C:\Python24\lib\site-packages\MoinMoin\action\AttachFile.py in upload_form (pagename=u'\u5185\u5b58\u7ba1\u7406', request=<MoinMoin.request.RequestModPy object>, msg=u"\u9644\u4ef6'\u8fd9\u662f\u4e00\u4e2a\u9644\u4ef6'(\u8fdc\u7aef\u540d\u79f0'E:\\Documents and Settings\\yin ze hong\\My Pictures\\icon\\vivian.JPG')\u5df2\u4e0a\u8f7d, \u5171\u8ba121031\u5b57\u8282.")

    1. 542 # Use user interface language for this generated page
    2. 543 request.setContentLanguage(request.lang)
    3. 544 wikiutil.send_title(request, _('Attachments for "%(pagename)s"') % {'pagename': pagename}, pagename=pagename, msg=msg)
    4. 545 request.write('<div id="content">\n') # start content div
    5. 546 send_uploadform(pagename, request)
    • global wikiutil = <module 'MoinMoin.wikiutil' from 'C:\Python24\lib\site-packages\MoinMoin\wikiutil.pyc'>
    • wikiutil.send_title = <function send_title>
    • request = <MoinMoin.request.RequestModPy object>
    • _ = <function <lambda>>
    • pagename = u'\u5185\u5b58\u7ba1\u7406'
    • msg = u"\u9644\u4ef6'\u8fd9\u662f\u4e00\u4e2a\u9644\u4ef6'(\u8fdc\u7aef\u540d\u79f0'E:\\Documents and Settings\\yin ze hong\\My Pictures\\icon\\vivian.JPG')\u5df2\u4e0a\u8f7d, \u5171\u8ba121031\u5b57\u8282."
  5. c:\Python24\Lib\site-packages\MoinMoin\wikiutil.py in send_title (request=<MoinMoin.request.RequestModPy object>, text=u'\u7f51\u9875"\u5185\u5b58\u7ba1\u7406"\u7684\u9644\u4ef6', **keywords={'msg': u"\u9644\u4ef6'\u8fd9\u662f\u4e00\u4e2a\u9644\u4ef6'(\u8fdc\u7aef\u540d\u79f0'E:\\Documents and Settings\\yin ze hong\\My Pictures\\icon\\vivian.JPG')\u5df2\u4e0a\u8f7d, \u5171\u8ba121031\u5b57\u8282.", 'pagename': u'\u5185\u5b58\u7ba1\u7406'})

    1. 1363 if pagename:
    2. 1364 from MoinMoin.action import AttachFile
    3. 1365 AttachFile.send_link_rel(request, pagename)
    4. 1366
    5. 1367 output.extend([
    • AttachFile = <module 'MoinMoin.action.AttachFile' from 'C:\Py...lib\site-packages\MoinMoin\action\AttachFile.py'>
    • AttachFile.send_link_rel = <function send_link_rel>
    • request = <MoinMoin.request.RequestModPy object>
    • pagename = u'\u5185\u5b58\u7ba1\u7406'
  6. C:\Python24\lib\site-packages\MoinMoin\action\AttachFile.py in send_link_rel (request=<MoinMoin.request.RequestModPy object>, pagename=u'\u5185\u5b58\u7ba1\u7406')

    1. 337
    2. 338 def send_link_rel(request, pagename):
    3. 339 files = _get_files(request, pagename)
    4. 340 if len(files) > 0 and not htdocs_access(request):
    5. 341 scriptName = request.getScriptname()
    • files undefined
    • global _get_files = <function _get_files>
    • request = <MoinMoin.request.RequestModPy object>
    • pagename = u'\u5185\u5b58\u7ba1\u7406'
  7. C:\Python24\lib\site-packages\MoinMoin\action\AttachFile.py in _get_files (request=<MoinMoin.request.RequestModPy object>, pagename=u'\u5185\u5b58\u7ba1\u7406')

    1. 298 attach_dir = getAttachDir(request, pagename)
    2. 299 if os.path.isdir(attach_dir):
    3. 300 files = map(lambda a: a.decode(config.charset), os.listdir(attach_dir))
    4. 301 files.sort()
    5. 302 return files
    • files undefined
    • builtin map = <built-in function map>
    • a undefined
    • global config = <module 'MoinMoin.config' from 'C:\Python24\lib\site-packages\MoinMoin\config.pyc'>
    • config.charset = 'utf-8'
    • global os = <module 'os' from 'C:\Python24\Lib\os.pyc'>
    • os.listdir = <built-in function listdir>
    • attach_dir = r'D:\moin\mywiki\data\pages\(e58685e5ad98e7aea1e79086)\attachments'
  8. C:\Python24\lib\site-packages\MoinMoin\action\AttachFile.py in (a='\xe8\xbf\x99\xe6\x98\xaf\xe4\xb8\x80\xe4\xb8\xaa\xe9\x99\x84\xe4\xbb')

    1. 298 attach_dir = getAttachDir(request, pagename)
    2. 299 if os.path.isdir(attach_dir):
    3. 300 files = map(lambda a: a.decode(config.charset), os.listdir(attach_dir))
    4. 301 files.sort()
    5. 302 return files
    • files undefined
    • builtin map = <built-in function map>
    • a = '\xe8\xbf\x99\xe6\x98\xaf\xe4\xb8\x80\xe4\xb8\xaa\xe9\x99\x84\xe4\xbb'
    • a.decode = <built-in method decode of str object>
    • global config = <module 'MoinMoin.config' from 'C:\Python24\lib\site-packages\MoinMoin\config.pyc'>
    • config.charset = 'utf-8'
    • global os = <module 'os' from 'C:\Python24\Lib\os.pyc'>
    • os.listdir = <built-in function listdir>
    • attach_dir undefined
  9. C:\Python24\lib\encodings\utf_8.py in decode (input='\xe8\xbf\x99\xe6\x98\xaf\xe4\xb8\x80\xe4\xb8\xaa\xe9\x99\x84\xe4\xbb', errors='strict')

    1. 14
    2. 15 def decode(input, errors='strict'):
    3. 16 return codecs.utf_8_decode(input, errors, True)
    4. 17
    5. 18 class StreamWriter(codecs.StreamWriter):
    • global codecs = <module 'codecs' from 'C:\Python24\Lib\codecs.pyc'>
    • codecs.utf_8_decode = <built-in function utf_8_decode>
    • input = '\xe8\xbf\x99\xe6\x98\xaf\xe4\xb8\x80\xe4\xb8\xaa\xe9\x99\x84\xe4\xbb'
    • errors = 'strict'
    • builtin True = True

UnicodeDecodeError

'utf8' codec can't decode bytes in position 15-16: unexpected end of data

  • args = ('utf8', '\xe8\xbf\x99\xe6\x98\xaf\xe4\xb8\x80\xe4\xb8\xaa\xe9\x99\x84\xe4\xbb', 15, 17, 'unexpected end of data')
  • encoding = 'utf8'
  • end = 17
  • object = '\xe8\xbf\x99\xe6\x98\xaf\xe4\xb8\x80\xe4\xb8\xaa\xe9\x99\x84\xe4\xbb'
  • reason = 'unexpected end of data'
  • start = 15

System Details