rst2confluence icon indicating copy to clipboard operation
rst2confluence copied to clipboard

Error if the source file does not have a title

Open iamFIREcracker opened this issue 13 years ago • 4 comments
trafficstars

Hi,

I have just noticed that if the source file does not begin with a section/subsection statement, the converter will quit with the following error:

cat README.rst | rst2confluence 
IndexError: list index out of range
Exiting due to error.  Use "--traceback" to diagnose.
Please report errors to <[email protected]>.
Include "--traceback" output, Docutils version (0.8.1 [release]),
Python version (2.7.3), your OS type & version, and the
command line used.

Don't know if a .rst file is expected to begin with a section/subsection statement, but I filed the bug because if I use rst2html everything works flawlessly, hence I thought that a similar behavior could be implemented for this converter as well.

If you don't have time to do it yourself, maybe point me to the right code section so I can try and help you.

Cheers,

Matteo

iamFIREcracker avatar Oct 16 '12 05:10 iamFIREcracker

Could you post an example? Works fine here.

cweiske avatar Jun 11 '13 13:06 cweiske

Sorry for the abysmal delay -- this shouldn't have happen.

By the way, I narrowed down the culprit document to the following:

**Foo**

This instead appears to be working fine:

Section
=======

**Bar**

So the bug seems to be due to having a document with a leading bold operator.

iamFIREcracker avatar Jan 19 '14 09:01 iamFIREcracker

I'll have a look at it tomorrow at work.

cweiske avatar Jan 19 '14 12:01 cweiske

@iamFIREcracker: thanks for the sample. The issue is fixed now in my fork.

cweiske avatar Jan 20 '14 06:01 cweiske