mwlib.cgi never returns

69 views
Skip to first unread message

Bill

unread,
Jun 24, 2009, 8:26:19 PM6/24/09
to mwlib
We're using the mwlib.cgi to perform the rendering and it seems to
never return after starting the pdf print. I look in the log output
for the cgi and I see:

....
2009-06-24T17:18:11 mwlib.serve.info >> render_status a70c4d3897945083
rl
2009-06-24T17:18:11 mwlib.wsgi.info >> request took 0.006124 s
2009-06-24T17:18:12 mwlib.serve.info >> render_status a70c4d3897945083
rl
2009-06-24T17:18:12 mwlib.wsgi.info >> request took 0.002621 s
2009-06-24T17:18:14 mwlib.serve.info >> render_status a70c4d3897945083
rl
2009-06-24T17:18:14 mwlib.wsgi.info >> request took 0.000997 s
2009-06-24T17:18:15 mwlib.serve.info >> render_status a70c4d3897945083
rl
2009-06-24T17:18:15 mwlib.wsgi.info >> request took 0.000984 s
...

but I get nothing back on the wiki.

Johannes Beigel

unread,
Jul 8, 2009, 5:56:53 AM7/8/09
to mw...@googlegroups.com

Most probably, mw-render can't be executed for some reason. Are there
any errors in the log? Can you execute mw-render manually on the
command line?

$ mw-render -o test.pdf -w rl -c http://yourwikis/base/url "Some
Article Name"

Are there any log or error files in the "collection directory"? The
name of the directory is constructed from the collection ID (the
cryptic alpha-numeric string in the log above) like this:

/path/to/your/cache/dir/a/a7/a70c4d3897945083

(i.e. first the path to your --cache-dir, then the first letter of the
collection ID, then the first two letters of the collection ID, then
the whole collection ID.)

-- Johannes

Bill

unread,
Jul 8, 2009, 7:32:59 PM7/8/09
to mwlib
I'd tried to upgrade to a newer mwlib at some point and it looks like
the python libs got out of whack. I removed mwlib, mwlib.ext and
mwlib.rl and re-installed so I think it's clean. Now I get the
following error from the render command you posted:


-----------------
mw-render -o foo.pdf -w rl -c http://my.server.com "PAGE" --
login=user:pass:local
font not found: arphic/uming.ttc
font not found: ttf-sil-ezra/SILEOT.ttf
font not found: ttf-farsiweb/nazli.ttf
font not found: unfonts/UnBatang.ttf
font not found: ttf-thai-arundina/ArundinaSans.ttf
font not found: ttf-telugu-fonts/lohit_te.ttf
font not found: ttf-devanagari-fonts/Sarai_07.ttf
font not found: ttf-indic-fonts-core/lohit_pa.ttf
font not found: ttf-oriya-fonts/lohit_or.ttf
font not found: ttf-malayalam-fonts/AnjaliOldLipi.ttf
font not found: ttf-kannada-fonts/Kedage-n.ttf
font not found: ttf-bengali-fonts/LikhanNormal.ttf
font not found: ttf-indic-fonts-core/lohit_ta.ttf
font not found: linux-libertine/LinLibertine_Re.ttf
2009-07-08T15:46:17 mwlib.utils.info >> fetching 'http://my.server.com/
api.php'
2009-07-08T15:46:17 mwlib.utils.info >> fetching 'http://my.server.com/
api.php?action=query&meta=siteinfo&format=json'
2009-07-08T15:46:18 mwlib.utils.info >> fetching 'http://my.server.com/
api.php'
Traceback (most recent call last):
Failure: exceptions.RuntimeError: Unrecognized value for parameter
'action': query
fatal: could not get siteinfo [[Failure instance: Traceback (failure
with no frames): exceptions.RuntimeError: Unrecognized value for
parameter 'action': query
]]
3/3/3 jobs -- 0/20 running
Traceback (most recent call last):
File "/usr/lib/python2.4/site-packages/mwlib-0.11.2-py2.4-linux-
i686.egg/mwlib/apps/render.py", line 108, in get_environment
self.zip_filename = hack(output=self.options.keep_zip,
options=self.options, env=env, status=self.status,
keep_tmpfiles=self.options.keep_tmpfiles)
File "/usr/lib/python2.4/site-packages/mwlib-0.11.2-py2.4-linux-
i686.egg/mwlib/apps/buildzip.py", line 105, in hack
reactor.run()
File "/usr/lib/python2.4/site-packages/Twisted-8.2.0-py2.4-linux-
i686.egg/twisted/internet/base.py", line 1128, in run
self.mainLoop()
File "/usr/lib/python2.4/site-packages/Twisted-8.2.0-py2.4-linux-
i686.egg/twisted/internet/base.py", line 1137, in mainLoop
self.runUntilCurrent()
--- <exception caught here> ---
File "/usr/lib/python2.4/site-packages/Twisted-8.2.0-py2.4-linux-
i686.egg/twisted/internet/base.py", line 757, in runUntilCurrent
call.func(*call.args, **call.kw)
File "/usr/lib/python2.4/site-packages/mwlib-0.11.2-py2.4-linux-
i686.egg/mwlib/twisted_api.py", line 734, in dispatch
reactor.stop()
File "/usr/lib/python2.4/site-packages/Twisted-8.2.0-py2.4-linux-
i686.egg/twisted/internet/base.py", line 526, in stop
raise error.ReactorNotRunning(
twisted.internet.error.ReactorNotRunning: Can't stop reactor that
isn't running.
done
removing '/tmp/nuwiki-xEykVd'
Traceback (most recent call last):
File "/usr/bin/mw-render", line 7, in ?
sys.exit(
File "/usr/lib/python2.4/site-packages/mwlib-0.11.2-py2.4-linux-
i686.egg/mwlib/apps/render.py", line 222, in main
return Main()()
File "/usr/lib/python2.4/site-packages/mwlib-0.11.2-py2.4-linux-
i686.egg/mwlib/apps/render.py", line 182, in __call__
env = self.get_environment()
File "/usr/lib/python2.4/site-packages/mwlib-0.11.2-py2.4-linux-
i686.egg/mwlib/apps/render.py", line 117, in get_environment
env = wiki.makewiki(self.zip_filename)
File "/usr/lib/python2.4/site-packages/mwlib-0.11.2-py2.4-linux-
i686.egg/mwlib/wiki.py", line 268, in makewiki
script_extension=script_extension,
File "/usr/lib/python2.4/site-packages/mwlib-0.11.2-py2.4-linux-
i686.egg/mwlib/wiki.py", line 218, in _makewiki
res.images = res.wiki = nuwiki.Adapt(zf)
File "/usr/lib/python2.4/site-packages/mwlib-0.11.2-py2.4-linux-
i686.egg/mwlib/nuwiki.py", line 202, in __init__
self.nuwiki = nuwiki(path_or_instance)
File "/usr/lib/python2.4/site-packages/mwlib-0.11.2-py2.4-linux-
i686.egg/mwlib/nuwiki.py", line 39, in __init__
self.nshandler = nshandling.nshandler(self.siteinfo)
File "/usr/lib/python2.4/site-packages/mwlib-0.11.2-py2.4-linux-
i686.egg/mwlib/nshandling.py", line 55, in __init__
self.capitalize = self.siteinfo['general'].get('case') == 'first-
letter'
KeyError: 'general'
--------------------

in the /cache/dir/whatever i've got an error.rl:
-----------------
traceback
Traceback (most recent call last):
File "/usr/lib/python2.4/site-packages/mwlib-0.11.2-py2.4-linux-
i686.egg/mwlib/apps/render.py", line 182, in __call__
env = self.get_environment()
File "/usr/lib/python2.4/site-packages/mwlib-0.11.2-py2.4-linux-
i686.egg/mwlib/apps/render.py", line 108, in get_environment
self.zip_filename = hack(output=self.options.keep_zip,
options=self.options, env=env, status=self.status,
keep_tmpfiles=self.options.keep_tmpfiles)
File "/usr/lib/python2.4/site-packages/mwlib-0.11.2-py2.4-linux-
i686.egg/mwlib/apps/buildzip.py", line 114, in hack
sys.exit(10)
SystemExit: 10
----------------------------------------




On Jul 8, 5:56 am, Johannes Beigel <johannes.bei...@brainbot.com>
wrote:
> On 25.06.2009, at 02:26, Bill wrote:
>
>
>
> > We're using the mwlib.cgi to perform the rendering and it seems to
> > never return after starting the pdf print.  I look in the log output
> > for the cgi and I see:
>
> > ....
> > 2009-06-24T17:18:11 mwlib.serve.info >> render_status a70c4d3897945083
> > rl
> > 2009-06-24T17:18:11 mwlib.wsgi.info >> request took 0.006124 s
> > 2009-06-24T17:18:12 mwlib.serve.info >> render_status a70c4d3897945083
> > rl
> > 2009-06-24T17:18:12 mwlib.wsgi.info >> request took 0.002621 s
> > 2009-06-24T17:18:14 mwlib.serve.info >> render_status a70c4d3897945083
> > rl
> > 2009-06-24T17:18:14 mwlib.wsgi.info >> request took 0.000997 s
> > 2009-06-24T17:18:15 mwlib.serve.info >> render_status a70c4d3897945083
> > rl
> > 2009-06-24T17:18:15 mwlib.wsgi.info >> request took 0.000984 s
> > ...
>
> > but I get nothing back on the wiki.
>
> Most probably, mw-render can't be executed for some reason. Are there  
> any errors in the log? Can you execute mw-render manually on the  
> command line?
>
> $ mw-render -o test.pdf -w rl -chttp://yourwikis/base/url"Some  

Johannes Beigel

unread,
Jul 10, 2009, 5:58:39 AM7/10/09
to mw...@googlegroups.com
On 09.07.2009, at 01:32, Bill wrote:
> mw-render -o foo.pdf -w rl -c http://my.server.com "PAGE" --
> login=user:pass:local

Uh, unfortunately, login is currently broken in the latest mwlib
release on PyPi. As a workaround you can install the current mwlib
version from the Mercurial repository, e.g. by downloading the tar.gz
archive from

http://code.pediapress.com/hg/mwlib/archive/tip.tar.gz

-- Johannes

Bill

unread,
Jul 10, 2009, 8:50:12 AM7/10/09
to mwlib
I tried to do that, when I try and run the 'python setup.py build
install' on the mwlib I get a message:
# python setup.py build
re2c
0.13.5
Error: please install re2c from http://re2c.org
# rpm -qa | grep re2c
re2c-0.13.5-1

0.13.5 seems to be the latest re2c so I'm not sure why the build is
failing.


I also though of reverting to an older version of mwlib, that fails w/
a different error (I think the rendering worked ok in 0.10.4 w/ the
passwd):

# easy_install -m mwlib==0.10.4
Searching for
mwlib==0.10.4
Reading http://pypi.python.org/simple/mwlib/
Reading http://code.pediapress.com/
Best match: mwlib
0.10.4
Downloading http://pypi.python.org/packages/source/m/mwlib/mwlib-0.10.4.tar.gz#m
d5=7dd449742a3ff1c38e4510a92f30e9cf
Processing
mwlib-0.10.4.tar.gz
Running mwlib-0.10.4/setup.py -q bdist_egg --dist-dir /tmp/
easy_install-jRhH_3/m
wlib-0.10.4/egg-dist-tmp-
Ce7v8v
USING: mwlib.templ.nodes mwlib/templ/
nodes.c
USING: mwlib.templ.evaluate mwlib/templ/
evaluate.c
error: Setup script exited with error: command 'gcc' failed: No child
processes





On Jul 10, 5:58 am, Johannes Beigel <johannes.bei...@brainbot.com>
wrote:
> On 09.07.2009, at 01:32, Bill wrote:
>
> > mw-render -o foo.pdf -w rl -chttp://my.server.com"PAGE" --

Bill

unread,
Jul 10, 2009, 9:41:31 AM7/10/09
to mwlib
nevermind, I was running this through an 'ajaxterm' (which is python)
and that was causing these error.

I installed the 0.11.3 version from the tarball and rendering seems to
be working now.

thanks.

On Jul 10, 8:50 am, Bill <theo...@gmail.com> wrote:
> I tried to do that, when I try and run the 'python setup.py build
> install' on the mwlib I get a message:
> # python setup.py build
> re2c
> 0.13.5
> Error: please install re2c fromhttp://re2c.org
> # rpm -qa | grep re2c
> re2c-0.13.5-1
>
> 0.13.5 seems to be the latest re2c so I'm not sure why the build is
> failing.
>
> I also though of reverting to an older version of mwlib, that fails w/
> a different error (I think the rendering worked ok in 0.10.4 w/ the
> passwd):
>
> # easy_install -m mwlib==0.10.4
> Searching for
> mwlib==0.10.4
> Readinghttp://pypi.python.org/simple/mwlib/
> Readinghttp://code.pediapress.com/
> Best match: mwlib
> 0.10.4
> Downloadinghttp://pypi.python.org/packages/source/m/mwlib/mwlib-0.10.4.tar.gz#m
> d5=7dd449742a3ff1c38e4510a92f30e9cf
> Processing
> mwlib-0.10.4.tar.gz
> Running mwlib-0.10.4/setup.py -q bdist_egg --dist-dir /tmp/
> easy_install-jRhH_3/m
> wlib-0.10.4/egg-dist-tmp-
> Ce7v8v
> USING: mwlib.templ.nodes mwlib/templ/
> nodes.c
> USING: mwlib.templ.evaluate mwlib/templ/
> evaluate.c
> error: Setup script exited with error: command 'gcc' failed: No child
> processes
>
> On Jul 10, 5:58 am, Johannes Beigel <johannes.bei...@brainbot.com>
> wrote:
>
>
>
> > On 09.07.2009, at 01:32, Bill wrote:
>
> > > mw-render -o foo.pdf -w rl -chttp://my.server.com"PAGE" --
> > > login=user:pass:local
>
> > Uh, unfortunately, login is currently broken in the latest mwlib  
> > release on PyPi. As a workaround you can install the current mwlib  
> > version from the Mercurial repository, e.g. by downloading the tar.gz  
> > archive from
>
> >    http://code.pediapress.com/hg/mwlib/archive/tip.tar.gz
>
> > -- Johannes- Hide quoted text -
>
> - Show quoted text -
Reply all
Reply to author
Forward
0 new messages