Modify

Opened 7 years ago

Closed 6 years ago

Last modified 6 years ago

#2168 closed defect (fixed)

IO Error after installing on Windows

Reported by: hbogaards Owned by: cdevienne
Priority: normal Component: PageToOdtPlugin
Severity: normal Keywords:
Cc: hbogaards@…, 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 7 years ago by hbogaards

  • Cc hbogaards@… added

comment:2 Changed 6 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 follow-up: Changed 6 years ago by cdevienne

  • Cc Yaniv.Mordekhay@… added
  • Status changed from new to assigned

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 6 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 6 years ago by cdevienne

  • Resolution set to fixed
  • Status changed from assigned to closed

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

comment:6 Changed 6 years ago by cdevienne

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

Add Comment

Modify Ticket

Action
as closed .
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from cdevienne. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.