<div dir="ltr"><br><div class="gmail_extra"><div class="gmail_quote">On Mon, Sep 29, 2014 at 7:11 AM, Markus Neteler <span dir="ltr"><<a href="mailto:neteler@osgeo.org" target="_blank">neteler@osgeo.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
<br>
recent changes broke the sphinx manual creation on <a href="http://grass.osgeo.org" target="_blank">grass.osgeo.org</a>:<br>
<br>
<br>
# Sphinx version: 1.2b3<br>
# Python version: 2.6.6<br>
# Docutils version: 0.8.1 release<br>
# Jinja2 version: 2.6<br>
# Loaded extensions:<br>
Traceback (most recent call last):<br>
File "/usr/local/lib/python2.6/dist-packages/Sphinx-1.2b3-py2.6.egg/sphinx/cmdline.py",<br>
line 245, in main<br>
warningiserror, tags, verbosity, parallel)<br>
File "/usr/local/lib/python2.6/dist-packages/Sphinx-1.2b3-py2.6.egg/sphinx/application.py",<br>
line 107, in __init__<br>
confoverrides or {}, self.tags)<br>
File "/usr/local/lib/python2.6/dist-packages/Sphinx-1.2b3-py2.6.egg/sphinx/config.py",<br>
line 229, in __init__<br>
execfile_(filename, config)<br>
File "/usr/local/lib/python2.6/dist-packages/Sphinx-1.2b3-py2.6.egg/sphinx/util/pycompat.py",<br>
line 93, in execfile_<br>
exec code in _globals<br>
File "conf.py", line 27, in <module><br>
from grass.script import core<br>
ImportError: No module named grass.script<br>
<br></blockquote><div>Both conf.py files and Sphinx itself requires import of packages/modules. So the documentation build must run inside a valid GRASS session. conf.py checks if GISBASE is set which is but it seems that Python path is not, although the Makefile contains:<br><br>$(call run_grass,$(SPHINXBUILD) ...)<br><br></div><div>Does `call run_grass` sets PYTHONPATH? It seems that it does:<br><br>PYTHONPATH="$(GRASS_PYTHONPATH)"<br><br></div><div>It even seems that variable is set properly (although with the syntax I'm never sure):<br><br>GRASS_PYTHONPATH := $(call mkpath,$(GISBASE)/gui/wxpython,$$PYTHONPATH)<br>GRASS_PYTHONPATH := $(call mkpath,$(GISBASE)/etc/python,$(GRASS_PYTHONPATH))<br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Any ideas why this no longer works? The cronjob is essentially<br>
untouched here as is the Debian box.<br>
<div class=""><div class="h5"><br></div></div></blockquote><div>I don't know on my computer it runs (outside of GRASS session). This reminds me about the problem with toolboxes and some other things which required GRASS session during compilation and were failing at some platforms (Macs and Linux servers) for unknown reasons.<br><br></div><div>You can try to run inside GRASS session and also add `print sys.path` before the import. The first will tell us if it is the same case as the ones I mentioned. The second will tell us if PYTHONPATH is set correctly.<br><br></div><div>Now I'm wondering if the module is even there. Do you actually compile GRASS or just the documentation?<br><br></div><div>Vaclav<br><br><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class=""><div class="h5">
Markus<br>
_______________________________________________<br>
grass-dev mailing list<br>
<a href="mailto:grass-dev@lists.osgeo.org">grass-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/grass-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/grass-dev</a><br>
</div></div></blockquote></div><br></div></div>