Index: rst2pdf/createpdf.py =================================================================== --- rst2pdf/createpdf.py (revision 2441) +++ rst2pdf/createpdf.py (working copy) @@ -56,6 +56,7 @@ from optparse import OptionParser import logging +import docutils from docutils.languages import get_language import docutils.readers.doctree import docutils.core @@ -97,6 +98,12 @@ escape=tenjin.helpers.escape templateEngine=tenjin.Engine() +# fix get_language for docutils>=0.8 +if docutils.__version__ >= '0.8': + orig_func = get_language + def get_language(arg1): + return orig_func(arg1, None) + def renderTemplate(tname, **context): context['to_str']=to_str context['escape']=escape Index: rst2pdf/pdfbuilder.py =================================================================== --- rst2pdf/pdfbuilder.py (revision 2441) +++ rst2pdf/pdfbuilder.py (working copy) @@ -27,6 +27,7 @@ from rst2pdf import pygments_code_block_directive, oddeven_directive from pygments.lexers import get_lexer_by_name, guess_lexer +import docutils from docutils import writers from docutils import nodes from docutils import languages @@ -56,7 +57,14 @@ from traceback import print_exc +# fix get_language for docutils>=0.8 +if docutils.__version__ >= '0.8': + orig_func = get_language + def get_language(arg1): + return orig_func(arg1, None) + languages.get_language = get_language + class PDFBuilder(Builder): name = 'pdf' out_suffix = '.pdf'