[GRASS-dev] trunk: sphinxdoclib broken

Hi,

on the Debian build server the following problem appeared in trunk
(relbranch is fine):

make sphinxdoclib
...
SPHINXBUILD: Found <sphinx-build>
SPHINXAPIDOC: Found <sphinx-apidoc>
SPHINXBUILD: Using <sphinx-build>
GISRC=/home/neteler/grass7_svn_head_bin_snapshot/trunk/dist.x86_64-pc-linux-gnu/demolocation/.grassrc71
GISBASE=/home/neteler/grass7_svn_head_bin_snapshot/trunk/dist.x86_64-pc-linux-gnu
PATH="/home/neteler/grass7_svn_head_bin_snapshot/trunk/dist.x86_64-pc-linux-gnu/bin:/home/neteler/grass7_svn_head_bin_snapshot/trunk/dist.x86_64-pc-linux-gnu/bin:/home/neteler/grass7_svn_head_bin_snapshot/trunk/dist.x86_64-pc-linux-gnu/scripts:$PATH"
PYTHONPATH="/home/neteler/grass7_svn_head_bin_snapshot/trunk/dist.x86_64-pc-linux-gnu/etc/python:/home/neteler/grass7_svn_head_bin_snapshot/trunk/dist.x86_64-pc-linux-gnu/gui/wxpython:$PYTHONPATH"
LD_LIBRARY_PATH="/home/neteler/grass7_svn_head_bin_snapshot/trunk/dist.x86_64-pc-linux-gnu/bin:/home/neteler/grass7_svn_head_bin_snapshot/trunk/dist.x86_64-pc-linux-gnu/bin:/home/neteler/grass7_svn_head_bin_snapshot/trunk/dist.x86_64-pc-linux-gnu/scripts:/home/neteler/grass7_svn_head_bin_snapshot/trunk/dist.x86_64-pc-linux-gnu/lib:/home/neteler/grass7_svn_head_bin_snapshot/trunk/dist.x86_64-pc-linux-gnu/lib:"
LC_ALL=C sphinx-build -b html -d _build/doctrees -c . src/
/home/neteler/grass7_svn_head_bin_snapshot/trunk/dist.x86_64-pc-linux-gnu/docs/html/libpython
Running Sphinx v1.2.3

Exception occurred:
  File "/usr/lib/python2.7/subprocess.py", line 1335, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory
The full traceback has been saved in /tmp/sphinx-err-S54551.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.
A bug report can be filed in the tracker at
<https://bitbucket.org/birkenfeld/sphinx/issues/&gt;\. Thanks!
Makefile:71: recipe for target 'libpythonhtml' failed
make[1]: *** [libpythonhtml] Error 1
make[1]: Leaving directory
'/home/neteler/grass7_svn_head_bin_snapshot/trunk/lib/python/docs'
include/Make/Sphinx.make:47: recipe for target 'sphinxdoclib' failed
make: *** [sphinxdoclib] Error 2

neteler@osgeo6:~/grass7_svn_head_bin_snapshot/trunk$ cat
/tmp/sphinx-err-S54551.log
# Sphinx version: 1.2.3
# Python version: 2.7.9
# Docutils version: 0.12 release
# Jinja2 version: 2.7.3
# Loaded extensions:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/sphinx/cmdline.py", line 253, in main
    warningiserror, tags, verbosity, parallel)
  File "/usr/lib/python2.7/dist-packages/sphinx/application.py", line
107, in __init__
    confoverrides or {}, self.tags)
  File "/usr/lib/python2.7/dist-packages/sphinx/config.py", line 229,
in __init__
    execfile_(filename, config)
  File "/usr/lib/python2.7/dist-packages/sphinx/util/pycompat.py",
line 105, in execfile_
    exec code in _globals
  File "conf.py", line 45, in <module>
    grass_version = core.version()['version']
  File "/home/neteler/grass7_svn_head_bin_snapshot/trunk/dist.x86_64-pc-linux-gnu/etc/python/grass/script/core.py",
line 1518, in version
    data = parse_command('g.version', flags='rge', errors='ignore')
  File "/home/neteler/grass7_svn_head_bin_snapshot/trunk/dist.x86_64-pc-linux-gnu/etc/python/grass/script/core.py",
line 501, in parse_command
    res = read_command(*args, **kwargs)
  File "/home/neteler/grass7_svn_head_bin_snapshot/trunk/dist.x86_64-pc-linux-gnu/etc/python/grass/script/core.py",
line 458, in read_command
    process = pipe_command(*args, **kwargs)
  File "/home/neteler/grass7_svn_head_bin_snapshot/trunk/dist.x86_64-pc-linux-gnu/etc/python/grass/script/core.py",
line 433, in pipe_command
    return start_command(*args, **kwargs)
  File "/home/neteler/grass7_svn_head_bin_snapshot/trunk/dist.x86_64-pc-linux-gnu/etc/python/grass/script/core.py",
line 377, in start_command
    return Popen(args, **popts)
  File "/home/neteler/grass7_svn_head_bin_snapshot/trunk/dist.x86_64-pc-linux-gnu/etc/python/grass/script/core.py",
line 74, in __init__
    subprocess.Popen.__init__(self, args, **kwargs)
  File "/usr/lib/python2.7/subprocess.py", line 710, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1335, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory
neteler@osgeo6:~/grass7_svn_head_bin_snapshot/trunk$ sphinx-
sphinx-apidoc sphinx-autogen sphinx-build sphinx-quickstart
neteler@osgeo6:~/grass7_svn_head_bin_snapshot/trunk$ sphinx-apidoc --version
Sphinx (sphinx-apidoc) 1.2.3

Any ideas? Recently it worked.

Markus

On Tue, Jan 26, 2016 at 11:21 AM, Markus Neteler <neteler@osgeo.org> wrote:

...
  File "/usr/lib/python2.7/dist-packages/sphinx/util/pycompat.py",
line 105, in execfile_
    exec code in _globals
  File "conf.py", line 45, in <module>
    grass_version = core.version()['version']
  File
"/home/neteler/grass7_svn_head_bin_snapshot/trunk/dist.x86_64-pc-linux-gnu/etc/python/grass/script/core.py",
line 1518, in version
    data = parse_command('g.version', flags='rge', errors='ignore')
...
    subprocess.Popen.__init__(self, args, **kwargs)
  File "/usr/lib/python2.7/subprocess.py", line 710, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1335, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory
...

Any ideas?

It looks like it can't find g.version.

I'm getting different error but the traceback doesn't refer to anything
with GRASS:

$ make sphinxdoclib
# Sphinx version: 1.2.3
# Python version: 2.7.10
# Docutils version: 0.12 release
# Jinja2 version: 2.8
...
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/sphinx/cmdline.py", line 254, in
main
    app.build(force_all, filenames)
  File "/usr/lib/python2.7/dist-packages/sphinx/application.py", line 220,
in build
    self.builder.build_update()
...
  File "/usr/lib/python2.7/dist-packages/sphinx/pycode/__init__.py", line
204, in for_module
    obj = cls.for_file(source, modname)
  File "/usr/lib/python2.7/dist-packages/sphinx/pycode/__init__.py", line
187, in for_file
    obj = cls(fileobj, modname, filename)
  File "/usr/lib/python2.7/dist-packages/sphinx/pycode/__init__.py", line
224, in __init__
    self.code = self.source.read().decode(self.encoding)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 8451:
ordinal not in range(128)

Which reminds me of #2875. Do we have somewhere a unicode & Python 3
related issue? (Unrelated to the g.version problem.)

https://trac.osgeo.org/grass/ticket/2875