On 04/16/2013 09:52 AM, Guenter Milde wrote:
On 2013-04-12, Luc Saffre wrote:

the new docutils version doesn't solve the problem, the message has just
become more short:

<partial node>:: (ERROR/3) Cannot embed stylesheet 'html4css1.css': No
such file or directory.

Otherwise it is still there, and it still doesn't cause any harm except
disturbing the output of my build.

The harm is subtle: missing standard formatting without the CSS rules in
the standard layout file. The difference might be almost "invisible"
depending on whether the document(s) contain construct relying on CSS
styling. (You may try to view, e.g., the functional test output files in
original form and with the stylesheet links removed to see the difference.)

...

I use Sphinx 1.2b1 and docutils 0.10, both installed using pip in a
virtualenv, and I get a lot of "error" messages when I build my Sphinx
docs:

<partial node>:: (ERROR/3) Cannot embed stylesheet
'../../../pythonenvs/py27/local/lib/python2.7/site-packages/docutils/writers/html4css1/html4css1.css':

No such file or directory.

It looks as if the substring "/local" in the above filename is too much.
I do have a file named
`/home/luc/pythonenvs/py27/lib/python2.7/site-packages/docutils/writers/html4css1/html4css1.css`

(without the "/local")

Do you have a directory "/pythonenvs/py27/local"?
If so, what is in it?

Oops, my statement was wrong. Thank your for asking. Yes I do have a "local" directory, and it contains links to the corresponding non-local directories, and both paths (with and without the "local") point to the file.

So I now guess that the prefix "../../../" is wrong.

Both, the release version and the repository version expect the standard
stylesheet in the same directory as the writer
(.../docutils/writers/html4css1). If you create a custom local writer, you
need to either copy or symlink the html4css4.css file or adapt the logic
that sets the stylesheet path.

No, I don't use a custom local writer.

Looking at `docutils/writers/html4css1/__init__.py` and `docutils/utils/__init__.py`, I would guess that this problem might come because docutils uses __file__ to find out where the source file is.

    default_stylesheet_dirs = ['.', utils.relative_path(
        os.path.join(os.getcwd(), 'dummy'), os.path.dirname(__file__))]

That trick doesn't work when the package is installed using pip. (I'm not absolutely sure about ahat I say, see `Accessing Data Files at Runtime
<http://pythonhosted.org/distribute/setuptools.html#accessing-data-files-at-runtime>`__
and
`Accessing Package Resources
<http://peak.telecommunity.com/DevCenter/PythonEggs#accessing-package-resources>`__)

Luc

--
You received this message because you are subscribed to the Google Groups 
"sphinx-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sphinx-users+unsubscr...@googlegroups.com.
To post to this group, send email to sphinx-users@googlegroups.com.
Visit this group at http://groups.google.com/group/sphinx-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to