Render server error with Collections Extension

232 views
Skip to first unread message

lasipisa

unread,
Aug 25, 2009, 7:38:14 PM8/25/09
to mwlib
Hello all,

I'm running MediaWiki 1.15, in xampplite (WAMP) environment, with
Python 2.5 all on my local machine. I've installed everything using
these instructions:
http://code.pediapress.com/wiki/wiki/WindowsSetup#Installingmwlib.rlonWindows

When I try to render a sample wiki page to pdf with the Collections
extension, I get the following error:

An error occured on the render server: traceback Traceback (most
recent call last): File "/home/tools/py25/lib/python2.5/site-packages/
mwlib-0.12.4-py2.5-linux-x86_64.egg/mwlib/apps/render.py", line 170,
in __call__ env = self.get_environment() File "/home/tools/py25/lib/
python2.5/site-packages/mwlib-0.12.4-py2.5-linux-x86_64.egg/mwlib/apps/
render.py", line 101, in get_environment self.zip_filename = make_zip
(output=self.options.keep_zip, options=self.options,
metabook=env.metabook, status=self.status) File "/home/tools/py25/lib/
python2.5/site-packages/mwlib-0.12.4-py2.5-linux-x86_64.egg/mwlib/apps/
buildzip.py", line 58, in make_zip make_nuwiki(fsdir,
metabook=metabook, options=options, podclient=podclient,
status=status) File "/home/tools/py25/lib/python2.5/site-packages/
mwlib-0.12.4-py2.5-linux-x86_64.egg/mwlib/apps/make_nuwiki.py", line
162, in make_nuwiki raise RuntimeError(str(val)) RuntimeError:
[Failure instance: Traceback (failure with no frames): <type
'exceptions.RuntimeError'>: could not get siteinfo ] sys.argv=['/home/
tools/py25/bin/mw-render', '--logfile', '/home/tools/cache/mw-serve/
5/58/58b559507229fa6c/mw-render.log.rl', '--error-file', '/home/tools/
cache/mw-serve/5/58/58b559507229fa6c/errors.rl', '--status-file', '/
home/tools/cache/mw-serve/5/58/58b559507229fa6c/status.rl', '--
writer', 'rl', '--output', '/home/tools/cache/mw-serve/
5/58/58b559507229fa6c/output.rl', '--pid-file', '/home/tools/cache/mw-
serve/5/58/58b559507229fa6c/pid.rl', '--metabook', '/home/tools/cache/
mw-serve/5/58/58b559507229fa6c/metabook.json', '--keep-zip', '/home/
tools/cache/mw-serve/5/58/58b559507229fa6c/collection.zip', '--
config', 'http://localhost/wiki', '--template-blacklist',
'MediaWiki:PDF Template Blacklist', '--template-exclusion-category',
'Exclude in print', '--print-template-prefix', 'Print', '--print-
template-pattern', '$1/Print', '--script-extension', '.php', '--
language', 'en']

I have not made any customizations, so just wondering how to get this
basic functionality working. Any pointer or nudges in the right
direction would be helpful. Thanks for your time.

Regards,
lisa

Ralf Schmitt

unread,
Aug 26, 2009, 3:55:03 PM8/26/09
to mw...@googlegroups.com
lasipisa <lasi...@gmail.com> writes:

it seems like you're using the public render server. The above is the
command which the server tried to run. --config http://localhost/wiki
is wrong. check your $wgServer and $wgScriptPath variables or do not use
the public render server (these are used to construct that url passed
after --config).


lasipisa

unread,
Aug 26, 2009, 4:02:46 PM8/26/09
to mwlib
> it seems like you're using the publicrenderserver. The above is the
> command which the server tried to run. --confighttp://localhost/wiki
> is wrong. check your $wgServer and $wgScriptPath variables or do not use
> the publicrenderserver (these are used to construct that url passed
> after --config).


Here's some of my configuration files. I thought I was using the
mwlib.cgi locally.
Thanks for looking at my issue :)

-----------------
LocalSettings.php

# Extension: Collection
require_once("$IP/extensions/Collection/Collection.php");
$wgCollectionMWServeURL = 'http://localhost/cgi-bin/mwlib.cgi';
$wgHTTPTimeout = 30;
$wgEnableAPI=true;

-----------------
mwlib.cgi

#! "D:\xampplite\python\python.exe"

"""This is the "CGI equivalent" of mw-serve. Adjust the configuration
variables
below and install this script as CGI script for your web server.
"""

# Configuration:

# Name of logfile or None if log output should go to stderr.
LOGFILE = None
#LOGFILE = 'D:/xampplite/python/log/mwlib.cgi.log'

# Cache directory. Must be writable.
CACHE_DIR = 'D:/xampplite/python/cache/mwlib/'

# (Path to) mw-render executable.
MWRENDER = 'D:/xampplite/python/Scripts/mw-render.exe'

# Logfile for mw-render.
MWRENDER_LOGFILE = 'D:/xampplite/python/log/mw-render.log'

# (Path to) mw-zip executable.
MWZIP = 'D:/xampplite/python/Scripts/mw-zip.exe'

# Logfile for mw-zip.
MWZIP_LOGFILE = 'D:/xampplite/python/log/mw-zip.log'

# (Path to) mw-post executable.
MWPOST = 'D:/xampplite/python/Scripts/mw-post.exe'

# Logfile for mw-post.
MWPOST_LOGFILE = 'D:/xampplite/python/log/mw-post.log'

# Queue directory for mw-watch or None if no queue should be used
QUEUE_DIR = None
#QUEUE_DIR = 'D:/xampplite/python/cache/mw-watch/q'

-------------------------

Ralf Schmitt

unread,
Aug 26, 2009, 4:28:25 PM8/26/09
to mw...@googlegroups.com
lasipisa <lasi...@gmail.com> writes:

>> it seems like you're using the publicrenderserver. The above is the
>> command which the server tried to run. --confighttp://localhost/wiki

Your mail program also seems to have some issues. I didn't write
publicrenderserver. I even checked my original email..

>> is wrong. check your $wgServer and $wgScriptPath variables or do not use
>> the publicrenderserver (these are used to construct that url passed
>> after --config).
>
>
> Here's some of my configuration files. I thought I was using the
> mwlib.cgi locally.
> Thanks for looking at my issue :)

issue?

lasipisa

unread,
Aug 26, 2009, 5:41:12 PM8/26/09
to mwlib
Hi Ralf,

I've added in the $wgServer, but $wgScriptPath was already there.

I added the port to the $wgCollectionMWServeURL, 8899, as pediapress
advises (http://code.pediapress.com/wiki/wiki/WikiToPDF)
and another post mentioned (http://groups.google.com/group/mwlib/
browse_thread/thread/de1c38b25777d529).

LocalSettings.php
-------------------------------
require_once( "$IP/includes/DefaultSettings.php" );
require_once("$IP/extensions/Collection/Collection.php");
$wgCollectionMWServeURL = 'http://localhost:8899/cgi-bin/mwlib.cgi';
$wgHTTPTimeout = 30;
$wgEnableAPI = true;
$wgServer = "http://localhost";
$wgScriptPath = "/wiki";
-------------------------------

I also wasn't starting up the mw-serve, so I tried that and got this
error:

sh-2.04$ mw-serve --protocol=http --port=8899
Traceback (most recent call last):
File "d:\xampplite\python\Scripts\mw-serve-script.py", line 8, in
<module>
load_entry_point('mwlib==0.12.3.dev', 'console_scripts', 'mw-
serve')()
File "d:\xampplite\python\lib\site-packages\mwlib-0.12.3.dev-py2.5-
win32.egg\mwlib\apps\serve.py", line 7, in mai
from flup.server import fcgi, fcgi_fork, scgi, scgi_fork
File "build\bdist.win32\egg\flup\server\fcgi_fork.py", line 56, in
<module>
File "build\bdist.win32\egg\flup\server\preforkserver.py", line 53,
in <module>
ImportError: Requires eunuchs module for Python < 2.4

Not too familiar with Python, but did anyone else have to download and
install Python eunuchs?
http://webmail.inoi.fi/open/trac/eunuchs
http://webmail.inoi.fi/open/trac/eunuchs/browser/trunk

Thanks for any further suggestions.
-lisa

Ralf Schmitt

unread,
Aug 26, 2009, 6:09:58 PM8/26/09
to mw...@googlegroups.com
lasipisa <lasi...@gmail.com> writes:

try --protocol=http_threaded
forking cannot work on windows. I guess flup misses some functionality and
assumes you're using python < 2.4.

lasipisa

unread,
Aug 26, 2009, 6:28:50 PM8/26/09
to mwlib
same error message when using

mw-serve --protocol=http_threaded --port=8899

sh-2.04$ mw-serve --protocol=http_threaded --port=8899
Traceback (most recent call last):
File "d:\xampplite\python\Scripts\mw-serve-script.py", line 8, in
<module>
load_entry_point('mwlib==0.12.3.dev', 'console_scripts', 'mw-
serve')()
File "d:\xampplite\python\lib\site-packages\mwlib-0.12.3.dev-py2.5-
win32.egg\mwlib\apps\serve.py", line 7, in main
from flup.server import fcgi, fcgi_fork, scgi, scgi_fork
File "build\bdist.win32\egg\flup\server\fcgi_fork.py", line 56, in
<module>
File "build\bdist.win32\egg\flup\server\preforkserver.py", line 53,
in <module>
ImportError: Requires eunuchs module for Python < 2.4



On Aug 26, 6:09 pm, Ralf Schmitt <r...@brainbot.com> wrote:

Ralf Schmitt

unread,
Aug 26, 2009, 7:03:13 PM8/26/09
to mw...@googlegroups.com
On Thu, Aug 27, 2009 at 12:28 AM, lasipisa<lasi...@gmail.com> wrote:
>
> same error message when using
>
> mw-serve --protocol=http_threaded --port=8899
>
> sh-2.04$ mw-serve --protocol=http_threaded --port=8899
> Traceback (most recent call last):
>  File "d:\xampplite\python\Scripts\mw-serve-script.py", line 8, in
> <module>
>    load_entry_point('mwlib==0.12.3.dev', 'console_scripts', 'mw-
> serve')()
>  File "d:\xampplite\python\lib\site-packages\mwlib-0.12.3.dev-py2.5-
> win32.egg\mwlib\apps\serve.py", line 7, in main
>    from flup.server import fcgi, fcgi_fork, scgi, scgi_fork
>  File "build\bdist.win32\egg\flup\server\fcgi_fork.py", line 56, in
> <module>
>  File "build\bdist.win32\egg\flup\server\preforkserver.py", line 53,
> in <module>
> ImportError: Requires eunuchs module for Python < 2.4

install eunuchs or remove the *_fork imports from apps/serve.py...

anyway, I won't help you here anymore. It's just a waste of time.

use cygwin or linux.

Reply all
Reply to author
Forward
0 new messages