2017-03-28 4 views
0

Ich versuche, ein MediaWiki zum Exportieren in PDF-Format mit dem Books/Collection, aber es hat Probleme Rendering.Problem mit Büchern auf MediaWiki

fand ich diese nützlichen article was sehr gut ist, aber wenn ich zu bekommen:

$ mw-render --config http:/.localhost/ --username='user' --password='password' --output /path/file.pdf --writer rl

bekomme ich ein Problem. Ich stecke meinen Benutzernamen und das Passwort in den Pfad ändern, aber ich bekomme die folgende Fehlermeldung:

/usr/local/lib/python2.7/dist-packages/mwlib/ext/reportlab/pdfbase/pdfmetrics.py:35: UserWarning: pyfribidi is not installed - RTL not supported 
    warnings.warn('pyfribidi is not installed - RTL not supported') 
/usr/local/lib/python2.7/dist-packages/mwlib/ext/reportlab/pdfgen/textobject.py:23: UserWarning: pyfribidi is not installed - RTL not supported 
    warnings.warn('pyfribidi is not installed - RTL not supported') 
MISSING FONTS: 'AR PL UMing HK','Nazli','UnBatang','Arundina Serif','Lohit Telugu','Sarai','Gujarati','Lohit Punjabi','Lohit Oriya','AnjaliOldLipi','Kedage','LikhanNormal','Lohit Tamil','Khmer' 
Traceback (most recent call last): 
    File "/usr/local/bin/mw-render", line 9, in <module> 
    load_entry_point('mwlib==0.15.14', 'console_scripts', 'mw-render')() 
    File "/usr/local/lib/python2.7/dist-packages/mwlib-0.15.14-py2.7-linux-i686.egg/mwlib/apps/render.py", line 243, in main 
    return Main()() 
    File "/usr/local/lib/python2.7/dist-packages/mwlib-0.15.14-py2.7-linux-i686.egg/mwlib/apps/render.py", line 194, in __call__ 
    env = self.get_environment() 
    File "/usr/local/lib/python2.7/dist-packages/mwlib-0.15.14-py2.7-linux-i686.egg/mwlib/apps/render.py", line 120, in get_environment 
    env = self.parser.makewiki()   
    File "/usr/local/lib/python2.7/dist-packages/mwlib-0.15.14-py2.7-linux-i686.egg/mwlib/options.py", line 114, in makewiki 
    env = wiki.makewiki(**kw) 
    File "/usr/local/lib/python2.7/dist-packages/mwlib-0.15.14-py2.7-linux-i686.egg/mwlib/wiki.py", line 213, in makewiki 
    res = _makewiki(config, metabook=metabook, **kw) 
    File "/usr/local/lib/python2.7/dist-packages/mwlib-0.15.14-py2.7-linux-i686.egg/mwlib/wiki.py", line 187, in _makewiki 
    raise RuntimeError("could not read config file %r" % (conf,)) 
RuntimeError: could not read config file u'http:localhost/' 

Wer weiß, was das Problem ist?

Antwort

1

Try this:

mw-render --config **http://localhost/** --username='user' --password='password' --output /path/file.pdf --writer rl 
+0

Hmm, nicht sicher, warum ich das verpasst habe. Aber es gibt immer noch einen Fehler, wenn auch einen anderen. Ich bekomme jetzt: 'result = _import (* args, ** kwargs) ImportError: Kein Modul namens coros' – Bob

+0

Ich habe versucht, Coros mit Pip installieren Coros installieren, aber es sagt, dass es nicht gefunden werden kann. – Bob

+0

Installieren Sie neueste Gevent Python-Paket, – RaminNietzsche

2

Wenn jemand hat Probleme mit dem "Coros" Modul nicht durch mwlib gefunden wird, hilft GEVENT Bibliothek Herabstufung. Das Coros-Modul wurde veraltet und später in neueren Versionen entfernt.

Ich bin nicht sicher, welche ist die neueste GEVENT Version, die die COROS-Modul hat, aber das das Problem für mich gelöst folgende:

pip install gevent==1.1 

Diese GEVENT Bibliothek auf Version 1.1 degradiert. Version 1.0 funktioniert nicht wegen PROTOCOL_SSLv3.