Description

On Updating a 1.5.8 Moin wiki to 1.8.2 I get this message:

ValueError: invalid literal for int() with base 10: '00000015\\^J'

-- ThiloPfennig 2009-04-27 15:29:18

Steps to reproduce

  1. I did use new config files in a farmconfig environment
  2. There was no meta file so I did use "152_to_1050300.py" to get one. I cant tell what has been done with the wiki before I took over. But the version in SystemInformation is 1.5.8.

  3. After I execute this migration script I had a "meta" file in the data_dir. It has this content data_format_revision: 1050800

  4. I then did a moin ... migration data which worked partly, but then:

   1 Calling migration script for /home/vinci/instance/wiki.bla.org/wiki/data, base revision 1050800
   2 Traceback (most recent call last):
   3   File "/usr/bin/moin", line 5, in <module>
   4     run()
   5   File "/var/lib/python-support/python2.6/MoinMoin/script/moin.py", line 15, in run
   6     MoinScript().run(showtime=0)
   7   File "/var/lib/python-support/python2.6/MoinMoin/script/__init__.py", line 138, in run
   8     self.mainloop()
   9   File "/var/lib/python-support/python2.6/MoinMoin/script/__init__.py", line 255, in mainloop
  10     plugin_class(args[2:], self.options).run() # all starts again there
  11   File "/var/lib/python-support/python2.6/MoinMoin/script/__init__.py", line 138, in run
  12     self.mainloop()
  13   File "/var/lib/python-support/python2.6/MoinMoin/script/migration/data.py", line 48, in mainloop
  14     curr_rev = execute(self, data_dir, curr_rev)
  15   File "/var/lib/python-support/python2.6/MoinMoin/script/migration/1050800.py", line 15, in execute
  16     dc.pass1()
  17   File "/var/lib/python-support/python2.6/MoinMoin/script/migration/_conv160.py", line 449, in pass1
  18     p.read()
  19   File "/var/lib/python-support/python2.6/MoinMoin/script/migration/_conv160.py", line 281, in read
  20     revlist = [int(rev) for rev in revlist]
  21 ValueError: invalid literal for int() with base 10: '00000015\\^J'

Example

The reason for this bug seems to be the existence of a file named

00000015?

in a revisions directory. I could find that out by adding one line in file /var/lib/python-support/python2.6/MoinMoin/script/migration/_conv160.py under line 278 So that it says:

        # read edit-log
        editlog_fname = opj(page_dir, 'edit-log')
        if os.path.exists(editlog_fname):
            self.editlog = EditLog(self.request, editlog_fname)
        # read page revisions

Component selection

Details

MoinMoin Version

1.8.2

OS and Version

Ubuntu Jaunty 9.04

Python Version

2.6.2

Server Setup

Server Details

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

en

Workaround

Discussion

Plan


CategoryMoinMoinNoBug

MoinMoin: MoinMoinBugs/ValueErrorInvalidLiteralWhileMigratingData (last edited 2009-04-27 17:40:18 by ThiloPfennig)