Menu

#6 Docutils 0.12 chokes on |loz| tags

v1.0 (example)
open
nobody
None
5
2016-02-15
2016-02-14
No

When I try to use pyweb on my own code, I get an error on |loz| tags.

I'm using a virtualenv, with Python 3 and these packages:

$ pip list
docutils (0.12)
pip (8.0.2)
py (1.4.31)
pytest (2.8.7)
pyweb (2.3.2)
setuptools (18.2)

I can fix the issue by adding these lines in my main .w file:

   .. include:: <xhtml1-lat1.txt>
   .. include:: <xhtml1-special.txt>
   .. include:: <xhtml1-symbol.txt>

The &loz; entity is in the -symbol file, but I threw the rest in to avoid having to look them up again later.

Given that lozenge use is part of the standard structure, I think the -symbol file, at the minimum, should be included automatically. (Or you could just copy the one definition out into the standard boilerplate.)

Discussion

  • Steven F. Lott

    Steven F. Lott - 2016-02-15
    MacBookPro-SLott:pyweb slott$ rst2html.py --version
    rst2html.py (Docutils 0.12 [release], Python 3.4.3, on darwin)
    MacBookPro-SLott:pyweb slott$ ls *.rst
    jedit.rst   pyweb.rst   testweaver.rst
    MacBookPro-SLott:pyweb slott$ rst2html.py pyweb.rst pyweb_t.html
    MacBookPro-SLott:pyweb slott$ open pyweb_t.html
    

    Can't reproduce it.

     
  • Austin Hastings

    Austin Hastings - 2016-02-15

    One difference might be python 3.5.1 vs 3.4.3, but I was able to reproduce it cold this morning:

    mkdir pyweb-bug6
    cd pyweb-bug6/
    pyvenv .
    source bin/activate
    pip install docutils
    cd ../pyweb-2.3.2
    python setup.py install
    cd -
    pip list
    vi test.w
    python -m pyweb test.w
    ls
    rst2html.py test.rst test.html
    python -V
    history
    

    Here's my test.w file:

    This is a test.
    
    @o test.py
    @{# test.py
    @}
    

    Here's my python -V and pip list:

    $ python -V
    Python 3.5.1
    
    $ pip list
    docutils (0.12)
    pip (8.0.2)
    pyweb (2.3.2)
    setuptools (18.2)
    

    Here's my output:

    $ rst2html.py test.rst test.html
    test.rst:15: (ERROR/3) Undefined substitution referenced: "loz".
    
     

Log in to post a comment.