openSUSE / docmanager

Manage DocBook 5 Meta Information
http://opensuse.github.io/docmanager/index.html
GNU General Public License v3.0
6 stars 6 forks source link

DocManager Traceback of PI #38

Closed tomschr closed 9 years ago

tomschr commented 9 years ago

Using MAIN.susecloud.xml, docmanager fails with error code 1 and the following error message:

$ docmanager init MAIN.susecloud.xml                   
Traceback (most recent call last):
  File "/local/doc/docmanager/env/bin/docmanager", line 9, in <module>
    load_entry_point('docmanager==3.0.0', 'console_scripts', 'docmanager')()
  File "/local/doc/docmanager/env/lib64/python3.4/site-packages/docmanager-3.0.0-py3.4.egg/docmanager/__init__.py", line 291, in main
    action.Actions(parsecli(cliargs))
  File "/local/doc/docmanager/env/lib64/python3.4/site-packages/docmanager-3.0.0-py3.4.egg/docmanager/action.py", line 47, in __init__
    self.__files = filehandler.Files(files)
  File "/local/doc/docmanager/env/lib64/python3.4/site-packages/docmanager-3.0.0-py3.4.egg/docmanager/filehandler.py", line 49, in __init__
    self.__xml_handlers.append(xmlhandler.XmlHandler(f))
  File "/local/doc/docmanager/env/lib64/python3.4/site-packages/docmanager-3.0.0-py3.4.egg/docmanager/xmlhandler.py", line 76, in __init__
    self.create_group()
  File "/local/doc/docmanager/env/lib64/python3.4/site-packages/docmanager-3.0.0-py3.4.egg/docmanager/xmlhandler.py", line 123, in create_group
    self.write()
  File "/local/doc/docmanager/env/lib64/python3.4/site-packages/docmanager-3.0.0-py3.4.egg/docmanager/xmlhandler.py", line 280, in write
    starttag = compilestarttag(self._roottag)
  File "/local/doc/docmanager/env/lib64/python3.4/site-packages/docmanager-3.0.0-py3.4.egg/docmanager/xmlutil.py", line 187, in compilestarttag
    starttagend.pattern)
  File "/usr/lib64/python3.4/re.py", line 219, in compile
    return _compile(pattern, flags)
  File "/usr/lib64/python3.4/re.py", line 288, in _compile
    p = sre_compile.compile(pattern, flags)
  File "/usr/lib64/python3.4/sre_compile.py", line 465, in compile
    p = sre_parse.parse(p, flags)
  File "/usr/lib64/python3.4/sre_parse.py", line 746, in parse
    p = _parse_sub(source, pattern, 0)
  File "/usr/lib64/python3.4/sre_parse.py", line 358, in _parse_sub
    itemsappend(_parse(source, state))
  File "/usr/lib64/python3.4/sre_parse.py", line 694, in _parse
    p = _parse_sub(source, state)
  File "/usr/lib64/python3.4/sre_parse.py", line 358, in _parse_sub
    itemsappend(_parse(source, state))
  File "/usr/lib64/python3.4/sre_parse.py", line 567, in _parse
    raise error("nothing to repeat")
sre_constants.error: nothing to repeat

After investigating a bit, it seems the PI is the problem. When I remove the <?xml-stylesheet ...?> PI before the DOCTYPE declaration, everything is fine.

mschnitzer commented 9 years ago

So what's the solution here? Removing PI during the DM process and adding it again afterwards?

mschnitzer commented 9 years ago

I think we can close this since we have a solution.

tomschr commented 9 years ago

Ignore the last comment, this was just a mistake (typo). The commit has nothing to do with this issue.