rst2pdf运行时发生错误的解决方法
rst2pdf在运行时出现了如下错误:
:Traceback (most recent call last):: File "/usr/bin/rst2pdf", line 9, in <module>: load_entry_point('rst2pdf==0.16', 'console_scripts', 'rst2pdf')(): File "/usr/lib/python2.7/site-packages/rst2pdf/createpdf.py", line 1452, inmain: numbered_links=options.numbered_links,: File "/usr/lib/python2.7/site-packages/rst2pdf/createpdf.py", line 169, in__init__: get_language (self.language):TypeError: get_language() takes exactly 2 arguments (1 given)
解决的方法是:正确安装docutils版本
docutils 0.7 -> get_language(language_code)docutils 0.8 -> get_language(language_code, reporter)所以需要安装docutils 0.7版本