[moin-user] Help on xapian configuration

mor fall fall.mor at outlook.com
Tue Jul 24 11:22:13 EDT 2018


I have just added some intended lines in the standard wikiconfig.py (ACL).

I think that the  errors come from  the wiki directory permission.


Make sure the directory and the subdirectory "pages" are owned by the web
server and are readable, writable and executable by the web server user
and group.


sorry for my english i  am not a native english speaker
regards,
________________________________
De : Paul Boddie <paul at boddie.org.uk>
Envoyé : mardi 24 juillet 2018 16:15
À : moin-user at python.org
Cc : mor fall
Objet : Re: [moin-user] Help on xapian configuration

On Tuesday 24. July 2018 15.38.38 mor fall wrote:
> Hello,
> Thank you Paul,
>
> i ve  configured xapian correctly but  when i run the moin command to buld
> an index i got a lots of  error.

I'll extract the parts you need to look at more closely:

> 2018-07-24 15:00:46,885 ERROR MoinMoin.config.multiconfig:53 Your source
> code / config file is not correctly indented! Traceback (most recent call
> last):
>   File
> "/srv/moin-private/python-env/local/lib/python2.7/site-packages/MoinMoin/c
> onfig/multiconfig.py", line 48, in _importConfigModule module =
> __import__(name, globals(), {})
>   File "/srv/moin-private/wiki/wikiconfig.py", line 176
>     xapian_search = 1
>     ^
> IndentationError: unexpected indent

[...]

> MoinMoin.error.ConfigurationError: IndentationError: unexpected indent
> (wikiconfig.py, line 176)
>
> The configuration files are Python modules. Therefore, whitespace is
> important. Make sure that you use only spaces, no tabs are allowed here!
> You have to use four spaces at the beginning of the line mostly.

So what this means is that you have to be careful how you edit the file. In
the wikiconfig.py file, you will see the following close to the top of the
file:

class Config(DefaultConfig):

Below this, there are lots of different settings that appear indented,
normally using four spaces at the start of each line, followed by the actual
text. For example:

    sitename = 'Documentation Wiki'
^^^^
These will be the spaces!

You just need to make sure that below these settings, you add the new setting
with four spaces and then the actual text:

    xapian_search = 1
^^^^
These will be the spaces!

If you use a tab character and your editor doesn't turn it into spaces, you
will get an error. Maybe the easiest approach that might still work is to put
the new setting right below the sitename setting, making sure it lines up
using spaces.

If you and/or your editor have changed the file to use tabs instead, which
isn't really recommended, you should also use tabs for the new setting. But
I'm assuming that your wikiconfig.py file is just a modified version of the
standard one.

Paul
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/moin-user/attachments/20180724/72831a9e/attachment.html>


More information about the moin-user mailing list