Trouble using CVS version
I'm having trouble getting the CVS version of docutils to convert anything to HTML (or even parse a simple reST file). When I run tools/html.py or tools/publish.py on tools/test.txt I get errors for |problematic|, which I expect, and for the figure:: directive, which looks like a bug. When I fix these problems (by removal), I get only an empty document. The only thing which seems to come from the test.txt is the first comment. I've created a dead simple test: When it's nothing but text it works OK, but as soon as I add an underlined section, all the content disappears, including the text. Is this a known problem with the current CVS code? --Dethe
Dethe Elza wrote:
I'm having trouble getting the CVS version of docutils to convert anything to HTML (or even parse a simple reST file). ... Is this a known problem with the current CVS code?
No, there's no problem I'm aware of. The last checkins were late last night, and http://docutils.sf.net/spec/notes.html was automatically generated at 03:52 UTC (2002-06-19). I just tried running it with fresh code, no problems. Perhaps some old files have been left behind? -- David Goodger <goodger@users.sourceforge.net> Open-source projects: - Python Docutils: http://docutils.sourceforge.net/ (includes reStructuredText: http://docutils.sf.net/rst.html) - The Go Tools Project: http://gotools.sourceforge.net/
OK, I deleted everything and refreshed from CVS, re-installed. It's working OK now except for one rather weird problem: If I have a section marker named "Conflict Resolution" thus: Conflict Resolution =============== then I get an error, but any other wording work, ie: Conflict Revolution =============== is OK. It doesn't seem to be case sensitive, and it doesn't happen if it's just a paragraph, only a heading. I thought maybe there was a regex which was matching this, but I'll be damned if I can find it. Very curious. Glad to have the rest working--thanks for the help. Undoubtedly user error. --Dethe -- "Melting down holy grails to make silver bullets for my .357 Panacea" Dethe Elza (delza@burningtiger.com) Chief Mad Scientist Enfolding Systems (http://enfoldingsystems.com) Weblog: http://livingcode.ca/
Dethe Elza wrote:
If I have a section marker named "Conflict Resolution" thus:
Conflict Resolution ===============
then I get an error, but any other wording work, ie:
Conflict Revolution ===============
is OK.
What's the error? Please don't make me guess. Maybe it's because you don't have enough "=" below the title? The underline should be at least as long as the title. Maybe there's another title with the same text? -- David Goodger <goodger@users.sourceforge.net> Open-source projects: - Python Docutils: http://docutils.sourceforge.net/ (includes reStructuredText: http://docutils.sf.net/rst.html) - The Go Tools Project: http://gotools.sourceforge.net/
Sorry, I should have posted the error, but it was on my linux box and I was writing from my Mac. There were definitely enough "=" because changing one letter made the problem go away. I didn't realize it was illegal to have two titles with the same text. That's probably it. (Checking) Yes, I had two titles with that text, and an internal link to it. Simple enough when I know where to look. Taking the internal link out also fixed the problem, so it's OK to have two identical titles, but not to link to them. The error I got was a looong traceback which ends: states.py, line 336, in underline nodes.py, line 667, in note_implicit_target nodes.py line 719, in clear_target_names if node.has_key('name'): AttributeError: 'NoneType' object has no attribute 'has_key' Which didn't say to me: duplicate reference. Thanks again, --Dethe -- "Melting down holy grails to make silver bullets for my .357 Panacea" Dethe Elza (delza@burningtiger.com) Chief Mad Scientist Enfolding Systems (http://enfoldingsystems.com) Weblog: http://livingcode.ca/
Dethe Elza wrote:
I didn't realize it was illegal to have two titles with the same text.
It's not illegal, but it becomes impossible to link to either by name because of the common name. If you run a front end with the "-v" or "--verbose" option, you should see a level-1 (info) system message:: Reporter: INFO (1) Duplicate implicit target name: "Conflict Resolution". However,
The error I got was a looong traceback which ends:
states.py, line 336, in underline nodes.py, line 667, in note_implicit_target nodes.py line 719, in clear_target_names if node.has_key('name'): AttributeError: 'NoneType' object has no attribute 'has_key'
Which didn't say to me: duplicate reference.
That's definitely a bug. No input data should ever cause Docutils to crash. I wasn't able to duplicate the problem from your description, although it *did* reveal a related bug (and very tricky to fix too). You aren't running Docutils from the 0.1 release, are you? If you are, please reinstall Docutils from the latest snapshot, always available at http://docutils.sf.net/docutils-snapshot.tgz. Could you please send me an input file and the command that generates this traceback? Please also tell me your Python version and Docutils version (snapshot date). -- David Goodger <goodger@users.sourceforge.net> Open-source projects: - Python Docutils: http://docutils.sourceforge.net/ (includes reStructuredText: http://docutils.sf.net/rst.html) - The Go Tools Project: http://gotools.sourceforge.net/
Ah, the --verbose option is good to know about. That does report the problem (and a couple others I hadn't figured out yet) before crashing. I'm working with the CVS version, loaded fresh yesterday. Python 2.2.1. I'll send the file and command as soon as I can get it from my laptop. Last night I ran an update command under (Debian) Linux which has completely hosed all network connectivity. I have an external floppy drive around somewhere, but digging it out right now would just distract from getting networking fixed. --Dethe -- "Melting down holy grails to make silver bullets for my .357 Panacea" Dethe Elza (delza@burningtiger.com) Chief Mad Scientist Enfolding Systems (http://enfoldingsystems.com) Weblog: http://livingcode.ca/
Dethe Elza wrote:
I'm working with the CVS version, loaded fresh yesterday. Python 2.2.1.
I realized this immediately after hitting the Send button, from the title. Sorry! -- David Goodger <goodger@users.sourceforge.net> Open-source projects: - Python Docutils: http://docutils.sourceforge.net/ (includes reStructuredText: http://docutils.sf.net/rst.html) - The Go Tools Project: http://gotools.sourceforge.net/
I've just checked in a reworking of how ``docutils.nodes.document`` does its name/id bookkeeping. This removes a subtle bug; details at http://docutils.sourceforge.net/spec/notes.html#bugs (but not for long). Dethe, I think it might solve the problem you reported. Could you try it out please? If the problem persists, please send details. Thanks. -- David Goodger <goodger@users.sourceforge.net> Open-source projects: - Python Docutils: http://docutils.sourceforge.net/ (includes reStructuredText: http://docutils.sf.net/rst.html) - The Go Tools Project: http://gotools.sourceforge.net/
participants (2)
-
David Goodger -
Dethe Elza