docx, xls (and others) generation/conversation

Asked by Dmitry Tomko on 2012-12-10

I'm using "external" openoffice to generate pdf, doc without any problem, but when i'm trying to generate docx, xls i got some strange messages:
first run:
>>> renderer.run()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "appy\pod\renderer.py", line 393, in run
    self.finalize()
  File "appy\pod\renderer.py", line 544, in finalize
    FolderDeleter.delete(self.tempFolder)
  File "appy\shared\utils.py", line 31, in delete
    os.remove(os.path.join(root, name))
WindowsError: [Error 32] The process cannot access the file because it is being
used by another process: 'e:\\reports\\out6.xls.1355135364.949000\\result.odt'

second run:
>>> renderer.run()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "appy\pod\renderer.py", line 386, in run
    self.currentParser.parse(self.contentXml)
  File "appy\shared\xml_parser.py", line 241, in parse
    self.parser.parse(inputSource)
  File "e:\splunk\Python-2.7\Lib\xml\sax\expatreader.py", line 107, in parse
    xmlreader.IncrementalParser.parse(self, source)
  File "e:\splunk\Python-2.7\Lib\xml\sax\xmlreader.py", line 123, in parse
    self.feed(buffer)
  File "e:\splunk\Python-2.7\Lib\xml\sax\expatreader.py", line 207, in feed
    self._parser.Parse(data, isFinal)
  File "e:\splunk\Python-2.7\Lib\xml\sax\expatreader.py", line 301, in start_ele
ment
    self._cont_handler.startElement(name, AttributesImpl(attrs))
  File "appy\pod\pod_parser.py", line 227, in startElement
    e.currentBuffer.dumpStartElement(elem, attrs)
  File "appy\pod\buffers.py", line 143, in dumpStartElement
    self.write('<%s' % elem)
  File "appy\pod\buffers.py", line 177, in write
    self.content.write(something.encode('utf-8'))
ValueError: I/O operation on closed file

Is it supported? Or I do something wrong?

Question information

Language:
English Edit question
Status:
Answered
For:
Appy Edit question
Assignee:
No assignee Edit question
Last query:
2012-12-10
Last reply:
2012-12-19

Hi Dmitry,
Indeed generation of docx has never been tested.
Feedback is welcome if you discover ways to overcome the errors :)
Cheers
Gaetan

Can you help with this problem?

Provide an answer of your own, or ask Dmitry Tomko for more information if necessary.

To post a message you must log in.