Modify

Opened 10 years ago

Closed 9 years ago

#1644 closed defect (worksforme)

Where do I obtain proper empty.odt?

Reported by: anonymous Owned by: Christophe de Vienne
Priority: normal Component: PageToOdtPlugin
Severity: blocker Keywords:
Cc: Trac Release: 0.10

Description

I've created empty OpenOffice document under attachments/wiki/PageToOdtStyles and when trying to get odt document I get this:

Traceback (most recent call last):
  File "/usr/lib/python2.4/site-packages/trac/web/main.py", line 406, in dispatch_request
    dispatcher.dispatch(req)
  File "/usr/lib/python2.4/site-packages/trac/web/main.py", line 237, in dispatch
    resp = chosen_handler.process_request(req)
  File "/usr/lib/python2.4/site-packages/tractags/web_ui.py", line 64, in process_request
    result = WikiModule.process_request(self, req)
  File "/usr/lib/python2.4/site-packages/trac/wiki/web_ui.py", line 134, in process_request
    page.text, format, page.name)
  File "/usr/lib/python2.4/site-packages/trac/mimeview/api.py", line 605, in send_converted
    content, selector)
  File "/usr/lib/python2.4/site-packages/trac/mimeview/api.py", line 385, in convert_content
    output = converter.convert_content(req, mimetype, content, ck)
  File "/usr/lib/python2.4/site-packages/pagetoodt/pagetoodt.py", line 36, in convert_content
    content = self.wiki_to_odtcontent(
  File "/usr/lib/python2.4/site-packages/pagetoodt/pagetoodt.py", line 86, in wiki_to_odtcontent
    new_content = ElementTree.fromstring(
  File "<string>", line 85, in XML
SyntaxError: mismatched tag: line 31, column 2

Attachments (0)

Change History (3)

comment:1 Changed 10 years ago by rdeman

sameproblem here. First my plugin did not work at all (did not show uo in WebAdmin -> Plugins) Then I figured that b/c I am using Python 2.5 I need to change the import statement si replaced in pagetoodt.py

#import cElementTree as ElementTree

with

from xml.etree.ElementTree import Element, ElementTree # python 2.5

note that I am a total Python newbie... at least the plugin shows up in the WebADmin -> Plugins menu now and it is activated... .but now I have the same problem as described above.

comment:2 Changed 10 years ago by mike.brady@…

One way do create the empty ODT document is with OpenOffice. Just create a new text document and save it. Then edit the PageToOdtStyles page in Trac and attach the document that you have created.

The style names on the PageToOdtStyles page will need to be changed to match styles that are available in the ODT document that you created.

Set "template" equal to the name of your empty document.

comment:3 Changed 9 years ago by Christophe de Vienne

Resolution: worksforme
Status: newclosed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Christophe de Vienne.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.