[moin-user] moinmoin 1.9.8 : errors attempting to reset account password via shell

Paul Boddie paul at boddie.org.uk
Sat Jul 29 10:43:47 EDT 2017


On Saturday 29. July 2017 15.53.56 Lars Noodén wrote:
> I seem to have MoinMoin 1.9.8 at least partially set up.  I can add new
> accounts via the web and edit pages and so on.  What I would like to do
> is use the shell interface to reset the password for an account.  From
> what I understand it should be the following:
> 
>     moin account resetpw --name=someaccount newpassword
> 
> However, when I run "moin" from the shell with those options I get the
> errors below.  What do I need to change to be able to reset passwords
> manually via the shell?

You may need to adjust the following...

The PYTHONPATH environment variable so that moin can find the right libraries. 
You seem to have Moin in /usr/local, so this may not be an issue.

The --config-dir option to the moin program. This usually needs setting to the 
path where your wikiconfig.py file is found.

The --wiki-url option to the moin program. This seems to be important when 
dealing with wikifarms where multiple wikis are available, but it is also 
possible that some operations need URL information.

The privileges used to run the command. Some operations won't work if moin 
encounters files it cannot update with the privileges it has.

In the traceback, I see some references to the dreaded caching system:

[...]

>   File
> "/usr/local/lib/python2.7/site-packages/MoinMoin/i18n/__init__.py", line
> 73, in i18n_init
>     meta_cache = caching.CacheEntry(request, 'i18n', 'meta',
> scope='wiki', use_pickle=True)
>   File "/usr/local/lib/python2.7/site-packages/MoinMoin/caching.py",
> line 73, in __init__
>     self.arena_dir = get_arena_dir(request, arena, scope)
>   File "/usr/local/lib/python2.7/site-packages/MoinMoin/caching.py",
> line 32, in get_arena_dir
>     return os.path.join(request.cfg.cache_dir, request.cfg.siteid, arena)

I always get worried about this because you can get some very difficult-to-
follow errors when the cache mechanism isn't working for some reason. However, 
I think it may be the following request-related operations which fail:

>   File
> "/usr/local/lib/python2.7/site-packages/MoinMoin/web/contexts.py", line
> 56, in get
>     res = obj.environ.setdefault(self.name, factory(obj))
>   File
> "/usr/local/lib/python2.7/site-packages/MoinMoin/web/contexts.py", line
> 132, in cfg
>     raise NotFound('<p>No wiki configuration matching the URL found!</p>')
> werkzeug.exceptions.NotFound: 404: <p>No wiki configuration matching the
> URL found!</p>

I would start with setting --config-dir and see what error you get next.

Paul


More information about the moin-user mailing list