[moin-devel] Debian packages problem: traceback in themes/__init__.py" line 831: AttributeError

Paul Boddie paul at boddie.org.uk
Wed Aug 14 17:59:50 EDT 2024


On Monday, 22 July 2024 01:31:24 CEST Paul Boddie wrote:
> 
> Just to follow up, I have now tested Moin with mod_wsgi and the error with
> request.view_args no longer occurs. I don't know why I experienced the
> errors before, unfortunately.

Just to follow up again, I identified the error and it is a trivial but 
annoying one. Having set up a wiki instance, I tried to visit it at...

http://127.0.0.1/20240814

This caused the error where request.view_args is None. Introducing some 
debugging statements indicated that the initial exception occurs in flask/
ctx.py in the RequestContext.match_request method, this being an HTTPException 
instance encoding a "308 Permanent Redirect" condition.

The exception is caught and set on the request's routing_exception attribute, 
but then request processing continues in flask/app.py in the 
Flask.preprocess_request method, leading to further processing without a 
usable view_args object in the Moin code itself. Ultimately, Moin's theme code 
causes an exception that is not gracefully handled.

All of this suggested that the following location might work instead, and it 
indeed does:

http://127.0.0.1/20240814/

I presumably tested using the different URL forms on different occasions, 
giving inconsistent results. However, I don't think that the redirect 
condition should cause an internal error, but I don't currently have a remedy 
that would fix this behaviour, either.

Paul




More information about the moin-devel mailing list