Problem converting a document with OO server
Hi
Here is my code :
fichiersortie = os.path.
renderer = appy.pod.
renderer.run()
and below the error I get at runtime. I can't figure out what's wrong, could someone help me ?
Thank you
-------
com.sun.
Tue Mar 30 17:23:23 2010
A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred.
/usr/lib/
207 #renderer = appy.pod.
208 renderer = appy.pod.
209 renderer.run()
210
211
renderer = <appy.pod.
/netapp/
305 self.currentPar
306 # Re-zip the result
307 self.finalize()
308
309 def getStyles(self):
self = <appy.pod.
/netapp/
415 self.result, FILE_TYPES.keys()))
416 # Call OpenOffice to perform the conversion or document update
417 self.callOpenOf
418 # I have the result. Move it to the correct name
419 resPrefix = os.path.
self = <appy.pod.
/netapp/
346 try:
347 Converter(
348 self.ooPort).run()
349 except ConverterError, ce:
350 raise PodError(
self = <appy.pod.
/netapp/
232 self.connect()
233 self.loadDocument()
234 self.convertDoc
235 self.doc.
236
self = <appy.pod.
/netapp/
226 optionsProp.Value = '59,34,76,1'
227 properties.
228 self.doc.
229
230 def run(self):
self = <appy.pod.
com.sun.
Context = None
ErrCode = 283
Message = u''
typeName = 'com.sun.
value =
code erreur : tmpA8t2z9.html
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Appy Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Arnaud Geslin
- Solved:
- 2010-03-31
- Last query:
- 2010-03-31
- Last reply:
Hello,
1) When you call the appy.pod.
2) It seems that the error occurs when OpenOffice tries to write the result on disk. Has the user running OpenOffice the permission to write in the folder of the generated result? If you try to write the resulting file at other places (ie, in /tmp), does it work?
3) What web framework do you use? Isn't it possible to produce standard Python stacktraces ? It would be more easy to give you the right answers.
Cheers !
Gaetan
Hello Gaëtan
Yes I give absolute path to Renderer, see my code : fichiersortie = os.path.
The result file is supposed to be written in the same directory than the python script. And this dir is 777. I see in the log that
self.resultUrl = u'file:
Is it normal that the file name ends with "...pdf.
(PS : about the framwork : I'm launching the whole stuff with a web client that calls my python script as a cgi)
Yes it is normal. Pod creates a temp folder where the template ODT is unzippped and the result is created and then converted to PDF. Maybe the temp dir that is created by the POD user (=cgi user) is created in such a way that the OpenOffice user can't write in the temp folder ?
That's right, as it works when I force dir to /tmp.
Thus I will look what's wrong with my dirs and users on Linux.
Thanks a lot for your help.
Arnaud