'module' object has no attribute 'systemPathToFileUrl'

Asked by Toan

I use web2py python framework with python26 & Open Office 3.3 mode server. Pls help me on this bug:

 File "E:/web2py1.90.6/applications/hdxd/controllers/plugin_report.py", line 277, in pos
    renderer.run()
  File "E:\web2py1.90.6\site-packages\appy\pod\renderer.py", line 345, in run
    self.finalize()
  File "E:\web2py1.90.6\site-packages\appy\pod\renderer.py", line 462, in finalize
    output = self.callOpenOffice(resultOdtName, resultType)
  File "E:\web2py1.90.6\site-packages\appy\pod\renderer.py", line 387, in callOpenOffice
    self.ooPort).run()
  File "E:\web2py1.90.6\site-packages\appy\pod\converter.py", line 70, in __init__
    self.docUrl, self.docPath = self.getInputUrls(docPath)
  File "E:\web2py1.90.6\site-packages\appy\pod\converter.py", line 88, in getInputUrls
    return uno.systemPathToFileUrl(docAbsPath), docAbsPath
AttributeError: 'module' object has no attribute 'systemPathToFileUrl'

Question information

Language:
English Edit question
Status:
Answered
For:
Appy Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Gaëtan Delannay (gaetan-delannay) said :
#1

Hello !
Please could you try this:

at the beginning of file appy\pod\converter.py, add "import unohelper"

In the same file, instead of calling "uno.systemPathToFileUrl", replace it with a call to "unohelper.systemPathToFileUrl"

Does it work ?
Thanks a lot!
Cheers
Gaetan

Revision history for this message
Toan (toan75) said :
#2

Thank Gaetan.

I tried and It's done same error. I think it's missing pyuno.py? Where i can find it?

>>> import pyuno
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: DLL load failed: The specified module could not be found.

Toan.

Revision history for this message
Gaëtan Delannay (gaetan-delannay) said :
#3

So it seems that your problem is not POD-related, but is tied to your Python interpreter which is not fully UNO-compliant.
OpenOffice ships with a UNO-compliant Python interpreter, is it the one you use? Typically such an interpreter can be found in <where_you_installed_OO>/program
In the Renderer you can specify a param with the path to a UNO-compliant Python interpreter, if the one running appy.pod isn't.
Gaetan

Can you help with this problem?

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

To post a message you must log in.