Modify

Opened 10 years ago

Closed 9 years ago

Last modified 9 years ago

#2168 closed defect (fixed)

IO Error after installing on Windows

Reported by: Hans Bogaards Owned by: Christophe de Vienne
Priority: normal Component: PageToOdtPlugin
Severity: normal Keywords:
Cc: Hans Bogaards, Yaniv.Mordekhay@… Trac Release: 0.10

Description

I installed the PageToOdtPlugin under Trac 0.10.4 running in Apache on a Windows machine. After installation I created the PageToOdtStyles wikipage and attached the empty.odt.

But when I tested it, I got the following the following Python Traceback:

Python Traceback

Traceback (most recent call last):
  File "C:\Python24\Lib\site-packages\trac\web\main.py", line 406, in dispatch_request
    dispatcher.dispatch(req)
  File "C:\Python24\Lib\site-packages\trac\web\main.py", line 237, in dispatch
    resp = chosen_handler.process_request(req)
  File "C:\Python24\Lib\site-packages\trac\wiki\web_ui.py", line 134, in process_request
    page.text, format, page.name)
  File "C:\Python24\Lib\site-packages\trac\mimeview\api.py", line 605, in send_converted
    content, selector)
  File "C:\Python24\Lib\site-packages\trac\mimeview\api.py", line 385, in convert_content
    output = converter.convert_content(req, mimetype, content, ck)
  File "build\bdist.win32\egg\pagetoodt\pagetoodt.py", line 42, in convert_content
  File "build\bdist.win32\egg\pagetoodt\pagetoodt.py", line 90, in wiki_to_odtcontent
IOError: [Errno 2] No such file or directory: '/tmp/raw.xml'

What's wrong?

Attachments (0)

Change History (6)

comment:1 Changed 10 years ago by Hans Bogaards

Cc: Hans Bogaards added; anonymous removed

comment:2 Changed 9 years ago by Yaniv.Mordekhay@…

I experience this problem too. I see that this problem was filed four months ago. Is there any updates on this issue? Thank you.

comment:3 Changed 9 years ago by Christophe de Vienne

Cc: Yaniv.Mordekhay@… added
Status: newassigned

It looks like I used a hard-coded path for a temporary file, and this path is not windows-friendly. Moreover, after a quick look at the code, it's only usefull for debegging purpose. Try changing line 20 in pagetoodt.py from :

dump_contents = True

to :

dump_contents = False

If that allows you to use the plugin on win32 I'll commit the patch.

comment:4 in reply to:  3 Changed 9 years ago by anonymous

I've applied the change but got a different error:

TypeError: __init__() got an unexpected keyword argument 'req'

Here's the traceback:

File "c:\python25\lib\site-packages\Trac-0.11b1-py2.5-win32.egg\trac\web\main.py", line 398, in  _dispatch_request  
File "c:\python25\lib\site-packages\Trac-0.11b1-py2.5-win32.egg\trac\web\main.py", line 195, in  dispatch  
File "c:\python25\lib\site-packages\Trac-0.11b1-py2.5-win32.egg\trac\wiki\web_ui.py", line 157, in  process_request  
File "c:\python25\lib\site-packages\Trac-0.11b1-py2.5-win32.egg\trac\mimeview\api.py", line 829, in  send_converted  
File "c:\python25\lib\site-packages\Trac-0.11b1-py2.5-win32.egg\trac\mimeview\api.py", line 559, in  convert_content  
File "build\bdist.win32\egg\pagetoodt\pagetoodt.py", line 43, in  convert_content  
File "build\bdist.win32\egg\pagetoodt\pagetoodt.py", line 93, in  wiki_to_odtcontent  
File "build\bdist.win32\egg\pagetoodt\odtformatter.py", line 126, in  wiki_to_odt  
File "build\bdist.win32\egg\pagetoodt\odtformatter.py", line 8, in  __init__ 

comment:5 Changed 9 years ago by Christophe de Vienne

Resolution: fixed
Status: assignedclosed

I think this other problem is trac-0.11 related, not win32 related. See #1950, which I did not review yet.

comment:6 Changed 9 years ago by Christophe de Vienne

(In [3314]) Disable a debugging purpose feature which make win32 deployment fail. This fix #2168.

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.