CentOS 5.6 で Sphinx が動かない
(追記:後日談としてCentOS 5.6 で Sphinx が動かなかった件の回答 - ナチュラル @rch850を書きました)
CentOS 5.6 で Sphinx の make html が例外落ちする現象で数時間はまってるのでメモします。
Sphinx の入れ方自体は、
$ sudo yum install python-setuptools $ sudo easy_install Sphinx
したものです。で、sphinx-quickstart でテンプレ作って、その状態から make html すると、例外で落ちます。
$ make html sphinx-build -b html -d _build/doctrees . _build/html Making output directory... Running Sphinx v1.1.3 loading pickled environment... failed: [Errno 2] No such file or directory: '/home/rch850/mydoc/_build/doctrees/environment.pickle' Exception occurred: File "/usr/lib/python2.4/copy_reg.py", line 92, in __newobj__ return cls.__new__(cls, *args) TypeError: function() takes at least 2 arguments (0 given) The full traceback has been saved in /tmp/sphinx-err-N1FCGZ.log, if you want to report the issue to the developers. Please also report this if it was a user error, so that a better error message can be provided next time. Either send bugs to the mailing list at <http://groups.google.com/group/sphinx-dev/>, or report them in the tracker at <http://bitbucket.org/birkenfeld/sphinx/issues/>. Thanks! make: *** [html] Error 1
full traceback ぺたぺた。
$ cat /tmp/sphinx-err-N1FCGZ.log # Sphinx version: 1.1.3 # Python version: 2.4.3 # Docutils version: 0.8.1 release # Jinja2 version: 2.6 Traceback (most recent call last): File "/usr/lib/python2.4/site-packages/Sphinx-1.1.3-py2.4.egg/sphinx/cmdline.py", line 188, in main warningiserror, tags) File "/usr/lib/python2.4/site-packages/Sphinx-1.1.3-py2.4.egg/sphinx/application.py", line 134, in __init__ self._init_builder(buildername) File "/usr/lib/python2.4/site-packages/Sphinx-1.1.3-py2.4.egg/sphinx/application.py", line 192, in _init_builder builderclass = getattr( File "/usr/lib/python2.4/site-packages/Sphinx-1.1.3-py2.4.egg/sphinx/builders/html.py", line 45, in ? from sphinx.highlighting import PygmentsBridge File "/usr/lib/python2.4/site-packages/Sphinx-1.1.3-py2.4.egg/sphinx/highlighting.py", line 29, in ? from pygments.lexers import PythonLexer, PythonConsoleLexer, CLexer, \ File "/usr/lib/python2.4/site-packages/Pygments-1.5-py2.4.egg/pygments/lexers/__init__.py", line 218, in __getattr__ _load_lexers(info[0]) File "/usr/lib/python2.4/site-packages/Pygments-1.5-py2.4.egg/pygments/lexers/__init__.py", line 32, in _load_lexers mod = __import__(module_name, None, None, ['__all__']) File "/usr/lib/python2.4/site-packages/Pygments-1.5-py2.4.egg/pygments/lexers/text.py", line 20, in ? from pygments.lexers.other import BashLexer File "/usr/lib/python2.4/site-packages/Pygments-1.5-py2.4.egg/pygments/lexers/other.py", line 22, in ? from pygments.lexers.sql import SqlLexer, MySqlLexer, SqliteConsoleLexer File "/usr/lib/python2.4/site-packages/Pygments-1.5-py2.4.egg/pygments/lexers/sql.py", line 174, in ? class PlPgsqlLexer(PostgresBase, RegexLexer): File "/usr/lib/python2.4/site-packages/Pygments-1.5-py2.4.egg/pygments/lexers/sql.py", line 185, in PlPgsqlLexer tokens = deepcopy(PostgresLexer.tokens) File "/usr/lib/python2.4/copy.py", line 174, in deepcopy y = copier(x, memo) File "/usr/lib/python2.4/copy.py", line 268, in _deepcopy_dict y[deepcopy(key, memo)] = deepcopy(value, memo) File "/usr/lib/python2.4/copy.py", line 174, in deepcopy y = copier(x, memo) File "/usr/lib/python2.4/copy.py", line 241, in _deepcopy_list y.append(deepcopy(a, memo)) File "/usr/lib/python2.4/copy.py", line 174, in deepcopy y = copier(x, memo) File "/usr/lib/python2.4/copy.py", line 248, in _deepcopy_tuple y.append(deepcopy(a, memo)) File "/usr/lib/python2.4/copy.py", line 204, in deepcopy y = _reconstruct(x, rv, 1, memo) File "/usr/lib/python2.4/copy.py", line 336, in _reconstruct y = callable(*args) File "/usr/lib/python2.4/copy_reg.py", line 92, in __newobj__ return cls.__new__(cls, *args) TypeError: function() takes at least 2 arguments (0 given)
"CentOS Sphinx Exception" とかのキーワードで検索しても同様の現象が見つからず、なんか自分の環境が悪そうな感じなので、バグレポートは上げてない状態です。
このあとカッとなって sudo yum upgrade しましたが、結果は変わらずでした。なんでだー