[Moin-user] Upgrading from 1.8.1 to 1.9.8

Paul Boddie paul at boddie.org.uk
Sun Apr 3 08:02:06 EDT 2016


On Sunday 3. April 2016 09.42.57 Karl Auer wrote:
> On Sun, 2016-04-03 at 16:24 +1000, Karl Auer wrote:
> > The upgrade notes all seem to be about installing 1.9.8 over 1.8.1 -
> > i.e., on the same system.
> 
> I've sort of faked that now: I set up /usr/local/share/moin with the
> 1.8.1 data and overlay directories (and their contents) in it, then
> installed 1.9.8 over the top. Copied moin.wsgi out of the server subdir
> and edited wikiconfig.pi appropriately.
> 
> Now I get a "500 internal error" from Apache for pretty much any page
> except the initial login page, and the final two lines of the Apache2
> error log are:
> 
> [Sun Apr 03 17:14:28.361957 2016] [wsgi:error] [pid 7602:tid
> 139732746934016] [remote 192.168.1.142:48395]   File "Nullarbor", line 2,
> in <module> [Sun Apr 03 17:14:28.362037 2016] [wsgi:error] [pid 7602:tid
> 139732746934016] [remote 192.168.1.142:48395] TypeError: 'dict' object is
> not callable
> 
> I've set the front page to be a page called "Nullarbor", and that page
> certainly exists in the data.

This looks like a cache-related error. At first it might seem strange that a 
non-Python file might be referenced in a traceback, but Moin effectively 
"compiles" pages to cache entries that are then "run" by Python. (Here, I'm 
relying on my memory of playing around with Moin's caching mechanism.)

> The "upgraded" install does seem to know about the old data at some
> level - if I try to open a page that I know is NOT there, MoinMoin will
> offer to create a new one. If I try to open a page that I know already
> exists, MoinMoin does NOT offer to create a new one; it throws the 500
> error instead.

This sounds like you need to clean the cache using the appropriate moin 
command. Something like this:

moin maint cleancache

You may need to operate as the Web server user (such as www-data) to 
successfully perform the operation:

sudo -u www-data moin maint cleancache

And, of course, the moin command must be in your PATH.

> It also knows about the old accounts - I can log in as the admin
> because I have set that one up new, but I can also log in as one of the
> users from the old system.
> 
> It even seems to be paying attention to the ACLs, saying for various
> pages that I don't have permission to view the page. But it actually
> can't display any pages, even those I have permission to view. The
> error log shows essentially identical errors for every page I try to
> view.
> 
> This may be something to do with caches, but I don't have the skill to
> adapt the script Rick Vandeveer provides with his upgrade notes.

Especially since it appears to be a Windows-centric guide:

https://moinmo.in/RickVanderveer/UpgradingFromMoin18ToMoin19

Most advice around upgrades, whether Moin or Python or both are being 
upgraded, will eventually involve cleaning the cache, either to adapt the 
cache entries to changes in the Moin API that may have occurred (since they 
are effectively programs), or to use the bytecode appropriate for the upgraded 
Python version.

Paul




More information about the Moin-user mailing list