Description

Describe the bug...

I am attempting to migrate from 1.5.2 to 1.9.1. I was successful in migrating this wiki to 1.5.3, but get an error when attempting to migrate to 1.9.1

Steps to reproduce

  1. moin --config-dir=<path/to/wiki>/<wikiname> --wiki-url=<URL>/<wikiname> migration data

  2. rename rename1.txt to rename2.txt
  3. moin --config-dir=<path/to/wiki>/<wikiname> --wiki-url=<URL>/<wikiname> migration data

Example

Component selection

Details

/home/Wiki/1.9.1/EuroAlgoTrade/data.pre160/pages/GhpQaSetup/attachments/QA_Env.PNG -> /home/Wiki/1.9.1/EuroAlgoTrade/data/pages/GhpQaSetup/attachments/QA_Env.PNG
Traceback (most recent call last):
  File "./moin", line 6, in <module>
    run()
  File "/home/Wiki/1.9.1/lib/python2.5/site-packages/MoinMoin/script/moin.py", line 15, in run
    MoinScript().run(showtime=0)
  File "/home/Wiki/1.9.1/lib/python2.5/site-packages/MoinMoin/script/__init__.py", line 138, in run
    self.mainloop()
  File "/home/Wiki/1.9.1/lib/python2.5/site-packages/MoinMoin/script/__init__.py", line 253, in mainloop
    plugin_class(args[2:], self.options).run() # all starts again there
  File "/home/Wiki/1.9.1/lib/python2.5/site-packages/MoinMoin/script/__init__.py", line 138, in run
    self.mainloop()
  File "/home/Wiki/1.9.1/lib/python2.5/site-packages/MoinMoin/script/migration/data.py", line 48, in mainloop
    curr_rev = execute(self, data_dir, curr_rev)
  File "/home/Wiki/1.9.1/lib/python2.5/site-packages/MoinMoin/script/migration/1059999.py", line 41, in execute
    dc.pass2()
  File "/home/Wiki/1.9.1/lib/python2.5/site-packages/MoinMoin/script/migration/_conv160.py", line 527, in pass2
    self.write_dest()
  File "/home/Wiki/1.9.1/lib/python2.5/site-packages/MoinMoin/script/migration/_conv160.py", line 557, in write_dest
    page.copy(pages_dir, self.renames)
  File "/home/Wiki/1.9.1/lib/python2.5/site-packages/MoinMoin/script/migration/_conv160.py", line 363, in copy
    self.write(pages_dir)
  File "/home/Wiki/1.9.1/lib/python2.5/site-packages/MoinMoin/script/migration/_conv160.py", line 338, in write
    self.revisions[rev].copy(rev_dir, self.renames)
  File "/home/Wiki/1.9.1/lib/python2.5/site-packages/MoinMoin/script/migration/_conv160.py", line 236, in copy
    data = self.read()
  File "/home/Wiki/1.9.1/lib/python2.5/site-packages/MoinMoin/script/migration/_conv160.py", line 218, in read
    data = data.decode(config.charset)
  File "/home/local/Python/x86-solaris2.10/2.5.4/lib/python2.5/encodings/utf_8.py", line 16, in decode
    return codecs.utf_8_decode(input, errors, True)
UnicodeDecodeError: 'utf8' codec can't decode byte 0xb7 in position 1083095: unexpected code byte

MoinMoin Version

1.9.1

OS and Version

x86-solaris2.10

Python Version

2.5.4

Server Setup

Server Details

Language you are using the wiki in (set in the browser/UserPreferences)

Workaround

Discussion

Also, I have this for coding: # -*- coding: iso-8859-1 -*-

I suspect that some wiki page (not attachment) near GhpQaSetup (that page or one "after" it) has non-utf-8 content. That is not supported and moin does not create such content. I suggest you fix that content and then re-try migration.

What is the order the migration script takes? What would come after the attachments folder for that directory? Does the script go by alphabetical order?

--Peter

Plan


CategoryMoinMoinBug

MoinMoin: MoinMoinBugs/Migration UnicodeDecodeError: 'utf8' codec can't decode byte (last edited 2010-02-25 15:45:40 by ReimarBauer)