#3 html.py fails w/o explicit destination

closed-works-for-me
None
5
2002-09-13
2002-09-12
No

When I do this:

echo "foo" | html.py

I expect the generated HTML on stdout. Instead, I get
this error:

Traceback (most recent call last):
File "./html.py", line 22, in ?
publish(writer_name='html', description=description)
File "/usr/lib/python2.2/site-
packages/docutils/core.py", line 162, in publish

pub.publish(argv, usage, description, option_spec)
File "/usr/lib/python2.2/site-
packages/docutils/core.py", line 137, in publish

output = self.writer.write(document, self.destination)
File "/usr/lib/python2.2/site-
packages/docutils/writers/__init__.py", line 58,
in write
self.translate()
File "/usr/lib/python2.2/site-
packages/docutils/writers/html4css1.py", line 47
, in translate
visitor = self.translator_class(self.document)
File "/usr/lib/python2.2/site-
packages/docutils/writers/html4css1.py", line 12
0, in __init__
options.stylesheet)]
File "/usr/lib/python2.2/site-
packages/docutils/utils.py", line 359, in relati
ve_uri
source_parts = os.path.abspath(source).split(os.sep)
File "/usr/lib/python2.2/posixpath.py", line 389, in
abspath
if not isabs(path):
File "/usr/lib/python2.2/posixpath.py", line 37, in isabs
return s[:1] == '/'
TypeError: unsubscriptable object

***

The same thing happens with a file specified on the
command line, but no file specified for output:

html.py foo

Discussion

  • David Goodger

    David Goodger - 2002-09-13
    • assigned_to: nobody --> goodger
    • status: open --> closed-works-for-me
     
  • David Goodger

    David Goodger - 2002-09-13

    Logged In: YES
    user_id=7733

    That was fixed weeks ago I believe. You must be using
    an old copy of the code. (Release 0.2, perhaps? Six
    weeks old now; ancient history!) Try it with the latest
    CVS code or snapshot: http://docutils.sf.net/docutils-
    snapshot.tgz

    If there's still a problem, please reopen this bug report.

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks