Hi, I've managed to get the mw-render and mw-serve programs running successfully on Ubuntu 9.04. The test "mw-render -c :en -w rl -o sun.pdf Sun" (from http://code.pediapress.com/wiki/wiki/mwlib.rl-install) works just fine, but I cannot successfully render any page from a local (private) wiki.
If I try an equivalent test command with the base URL directed to my private wiki, I get the following output (note the URL details have been obfuscated) in the mw-render.log.rl file: $ mw-render -c http://www.example.com/w/ -w rl -o test.pdf Collections 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-16T14:59:16 mwlib.utils.info >> fetching 'http:// www.example.com/w/api.php?action=query&meta=siteinfo&format=json' Traceback (most recent call last): File "/usr/local/lib/python2.6/dist-packages/Twisted-8.2.0-py2.6- linux-i686.egg/twisted/internet/defer.py", line 328, in _runCallbacks self.result = callback(self.result, *args, **kw) File "/usr/local/lib/python2.6/dist-packages/mwlib-0.11.2-py2.6- linux-i686.egg/mwlib/twisted_api.py", line 142, in done d.callback(val) File "/usr/local/lib/python2.6/dist-packages/Twisted-8.2.0-py2.6- linux-i686.egg/twisted/internet/defer.py", line 243, in callback self._startRunCallbacks(result) File "/usr/local/lib/python2.6/dist-packages/Twisted-8.2.0-py2.6- linux-i686.egg/twisted/internet/defer.py", line 312, in _startRunCallbacks self._runCallbacks() --- <exception caught here> --- File "/usr/local/lib/python2.6/dist-packages/Twisted-8.2.0-py2.6- linux-i686.egg/twisted/internet/defer.py", line 328, in _runCallbacks self.result = callback(self.result, *args, **kw) File "/usr/lib/python2.6/json/__init__.py", line 307, in loads return _default_decoder.decode(s) File "/usr/lib/python2.6/json/decoder.py", line 319, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/lib/python2.6/json/decoder.py", line 338, in raw_decode raise ValueError("No JSON object could be decoded") exceptions.ValueError: No JSON object could be decoded fatal: could not get siteinfo [[Failure instance: Traceback: <type 'exceptions.ValueError'>: No JSON object could be decoded /usr/local/lib/python2.6/dist-packages/Twisted-8.2.0-py2.6-linux- i686.egg/twisted/internet/defer.py:328:_runCallbacks /usr/local/lib/python2.6/dist-packages/mwlib-0.11.2-py2.6-linux- i686.egg/mwlib/twisted_api.py:142:done /usr/local/lib/python2.6/dist-packages/Twisted-8.2.0-py2.6-linux- i686.egg/twisted/internet/defer.py:243:callback /usr/local/lib/python2.6/dist-packages/Twisted-8.2.0-py2.6-linux- i686.egg/twisted/internet/defer.py:312:_startRunCallbacks --- <exception caught here> --- /usr/local/lib/python2.6/dist-packages/Twisted-8.2.0-py2.6-linux- i686.egg/twisted/internet/defer.py:328:_runCallbacks /usr/lib/python2.6/json/__init__.py:307:loads /usr/lib/python2.6/json/decoder.py:319:decode /usr/lib/python2.6/json/decoder.py:338:raw_decode ]] 3/3/3 jobs -- 0/20 running Traceback (most recent call last): File "/usr/local/lib/python2.6/dist-packages/mwlib-0.11.2-py2.6- 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/local/lib/python2.6/dist-packages/mwlib-0.11.2-py2.6- linux-i686.egg/mwlib/apps/buildzip.py", line 105, in hack reactor.run() File "/usr/local/lib/python2.6/dist-packages/Twisted-8.2.0-py2.6- linux-i686.egg/twisted/internet/base.py", line 1128, in run self.mainLoop() File "/usr/local/lib/python2.6/dist-packages/Twisted-8.2.0-py2.6- linux-i686.egg/twisted/internet/base.py", line 1137, in mainLoop self.runUntilCurrent() --- <exception caught here> --- File "/usr/local/lib/python2.6/dist-packages/Twisted-8.2.0-py2.6- linux-i686.egg/twisted/internet/base.py", line 757, in runUntilCurrent call.func(*call.args, **call.kw) File "/usr/local/lib/python2.6/dist-packages/mwlib-0.11.2-py2.6- linux-i686.egg/mwlib/twisted_api.py", line 734, in dispatch reactor.stop() File "/usr/local/lib/python2.6/dist-packages/Twisted-8.2.0-py2.6- linux-i686.egg/twisted/internet/base.py", line 527, in stop "Can't stop reactor that isn't running.") twisted.internet.error.ReactorNotRunning: Can't stop reactor that isn't running. done removing '/tmp/nuwiki-U6LEIa' Traceback (most recent call last): File "/usr/local/bin/mw-render", line 8, in <module> load_entry_point('mwlib==0.11.2', 'console_scripts', 'mw-render') () File "/usr/local/lib/python2.6/dist-packages/mwlib-0.11.2-py2.6- linux-i686.egg/mwlib/apps/render.py", line 222, in main return Main()() File "/usr/local/lib/python2.6/dist-packages/mwlib-0.11.2-py2.6- linux-i686.egg/mwlib/apps/render.py", line 182, in __call__ env = self.get_environment() File "/usr/local/lib/python2.6/dist-packages/mwlib-0.11.2-py2.6- linux-i686.egg/mwlib/apps/render.py", line 117, in get_environment env = wiki.makewiki(self.zip_filename) File "/usr/local/lib/python2.6/dist-packages/mwlib-0.11.2-py2.6- linux-i686.egg/mwlib/wiki.py", line 268, in makewiki script_extension=script_extension, File "/usr/local/lib/python2.6/dist-packages/mwlib-0.11.2-py2.6- linux-i686.egg/mwlib/wiki.py", line 218, in _makewiki res.images = res.wiki = nuwiki.Adapt(zf) File "/usr/local/lib/python2.6/dist-packages/mwlib-0.11.2-py2.6- linux-i686.egg/mwlib/nuwiki.py", line 202, in __init__ self.nuwiki = nuwiki(path_or_instance) File "/usr/local/lib/python2.6/dist-packages/mwlib-0.11.2-py2.6- linux-i686.egg/mwlib/nuwiki.py", line 39, in __init__ self.nshandler = nshandling.nshandler(self.siteinfo) File "/usr/local/lib/python2.6/dist-packages/mwlib-0.11.2-py2.6- linux-i686.egg/mwlib/nshandling.py", line 55, in __init__ self.capitalize = self.siteinfo['general'].get('case') == 'first- letter' KeyError: 'general' $ I've tried a couple of versions of the Collection extension, and having a look at the code, none of the versions I have seem to refer to the PDF Template Blacklist like (from what I can ascertain) older versions in SVN. There is no PDF Template Blacklist virtual page in the MediaWiki namespace for our local wiki. Could this be a mismatch between the mwlib.rl software downloaded using the instructions provided by http://code.pediapress.com/wiki/wiki/mwlib.rl-install, and the latest (stable or development) version of the Collection extension? We are running MediaWiki 1.15.0 with PHP 5.2.9-2 and MySQL 5.1.35. Of possible relevance (or at least for completeness), I had to insert the line $text = ""; within the Collection extension's Collection.body.php file (line 1021) at the start of the post() function to avoid the function attempting to return an undefined variable. Any thoughts would be welcome. Thanks. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "mwlib" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/mwlib?hl=en -~----------~----~----~----~------~----~------~--~---
