Source: git-cola
Version: 1.8.2-1
Severity: important
Tags: patch
User: [email protected]
Usertags: sphinx1.2
When rebuilt against python-sphinx 1.2~b1+dfsg-1 (available in
experimental), git-cola failed to build from source:
| sphinx-build -b html -d _build/doctrees . _build/html
| Making output directory...
| Running Sphinx v1.2b1
| loading pickled environment... not yet created
| loading intersphinx inventory from http://docs.python.org/objects.inv...
| WARNING: intersphinx inventory 'http://docs.python.org/objects.inv' not fetchable due to
<class 'urllib2.URLError'>: <urlopen error [Errno -2] Name or service not known>
| building [html]: targets for 6 source files that are out of date
| updating environment: 6 added, 0 changed, 0 removed
| reading sources... [ 16%] index
| reading sources... [ 33%] intro
| reading sources... [ 50%] mainwindow
| reading sources... [ 66%] relnotes
| reading sources... [ 83%] thanks
| reading sources... [100%] tools
|
| looking for now-outdated files... none found
| pickling environment... done
| checking consistency... done
| preparing documents... done
| writing output... [ 16%] index
| writing output... [ 33%] intro
| writing output... [ 50%] mainwindow
| writing output... [ 66%] relnotes
| writing output... [ 83%] thanks
| writing output... [100%] tools
|
| writing additional files... genindex search
| copying static files... done
| dumping search index... done
| dumping object inventory... done
| build succeeded, 1 warning.
|
| Exception occurred:
| File
"/build/git-cola-oksCdv/git-cola-1.8.2/extras/sphinxtogithub/sphinxtogithub.py",
line 38, in process
| return text.replace( self.from_, self.to )
| UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 288:
ordinal not in range(128)
| The full traceback has been saved in /tmp/sphinx-err-tBAkdq.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-users/>,
| or report them in the tracker at
<http://bitbucket.org/birkenfeld/sphinx/issues/>. Thanks!
| make[2]: *** [html] Error 1
The full traceback was:
| Traceback (most recent call last):
| File "/usr/lib/pymodules/python2.7/sphinx/cmdline.py", line 247, in main
| app.build(force_all, filenames)
| File "/usr/lib/pymodules/python2.7/sphinx/application.py", line 220, in
build
| self.emit('build-finished', None)
| File "/usr/lib/pymodules/python2.7/sphinx/application.py", line 353, in emit
| results.append(callback(self, *args))
| File
"/build/git-cola-oksCdv/git-cola-1.8.2/extras/sphinxtogithub/sphinxtogithub.py",
line 314, in sphinx_extension
| layout.process()
| File
"/build/git-cola-oksCdv/git-cola-1.8.2/extras/sphinxtogithub/sphinxtogithub.py",
line 173, in process
| handler.process()
| File
"/build/git-cola-oksCdv/git-cola-1.8.2/extras/sphinxtogithub/sphinxtogithub.py",
line 54, in process
| text = replacer.process( text )
| File
"/build/git-cola-oksCdv/git-cola-1.8.2/extras/sphinxtogithub/sphinxtogithub.py",
line 38, in process
| return text.replace( self.from_, self.to )
| UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 288:
ordinal not in range(128)
The problem is that Application.outdir attribute is a unicode string
(rather than byte string) in Sphinx 1.2. The attached patch fixes the
FTBFS. It's not beautiful, but it fixes the problem at hand, and doesn't
make things worse than status quo.
--
Jakub Wilk
--- a/extras/sphinxtogithub/sphinxtogithub.py
+++ b/extras/sphinxtogithub/sphinxtogithub.py
@@ -199,7 +199,7 @@
self.force = force
def create_layout(self, path):
-
+ path = str(path)
contents = self.dir_helper.list_dir(path)
renamer = self.file_helper.move