I can't print pdf. I have a different error

unoconv: UnoException during export phase:
Unable to store document to private:stream (ErrCode 3088)

Properties: ((com.sun.star.beans.PropertyValue){ Name = (string)"FilterName"
, Handle = (long)0x0, Value = (any){ (string)"writer_pdf_Export" }, State = 
(com.sun.star.beans.PropertyState)DIRECT_VALUE }, (com.sun.star.beans.
PropertyValue){ Name = (string)"OutputStream", Handle = (long)0x0, Value = (
any){ (com.sun.star.uno.XInterface)0x2785248{, supportedInterfaces={com.sun.
star.lang.XTypeProvider,com.sun.star.io.XOutputStream}} }, State = (com.sun.
star.beans.PropertyState)DIRECT_VALUE }, (com.sun.star.beans.PropertyValue){ 
Name = (string)"Overwrite", Handle = (long)0x0, Value = (any){ (boolean)true 
}, State = (com.sun.star.beans.PropertyState)DIRECT_VALUE })
[Mon May 25 10:39:28 2015] ERROR:trytond.protocols.dispatcher:Exception 
calling report.sale.sale.execute from [email protected]:60930/test
Traceback (most recent call last):
  File "/opt/tryton/instances/test/trytond/protocols/dispatcher.py", line 
161, in dispatch
    result = rpc.result(meth(*c_args, **c_kwargs))
  File "/opt/tryton/instances/test/trytond/report/report.py", line 144, in 
execute
    type, data = cls.parse(action_report, records, data, {})
  File "/opt/tryton/instances/test/trytond/modules/company/company.py", 
line 365, in parse
    localcontext)
  File "/opt/tryton/instances/test/trytond/report/report.py", line 300, in 
parse
    data = cls.unoconv(data, report.template_extension, output_format)
  File "/opt/tryton/instances/test/trytond/report/report.py", line 320, in 
unoconv
    raise Exception(stderrdata)
Exception: None

I modify report.py (only for test) and works



       #cmd = ['/usr/local/bin/unoconv', '--connection=\'%s\'' % 
config.get('report', 'unoconv'),
       #      '-f', oext, '--stdout', path]
       ##PARCHE PARA IMPRIMIR PDF FALLA EN EL STDOUT

       import re
       outputpath = re.sub('.odt', '.%s' % (oext), path)
       if os.path.exists(outputpath):
           os.unlink(outputpath)

 
       cmd = "/usr/local/bin/unoconv --connection='%s' -f %s %s > 
/dev/null 2>&1" % (config.get('report', 'unoconv'),oext, path)
       try:
           import commands
           status, output = commands.getstatusoutput(cmd)
           if os.path.exists(outputpath):
              with open(outputpath, 'r') as content_file:
                   stdoutdata = content_file.read()
           else:
               raise "ERROR"
           return stdoutdata
       finally:
           os.remove(path)
           os.remove(outputpath)


anybody has the same problem?


El miércoles, 20 de mayo de 2015, 18:38:39 (UTC+1), Fabyc escribió:
>
> On Wednesday, May 20, 2015 at 12:00:04 PM UTC-5, Cédric Krier wrote:
>>
>> On 20 May 09:24, Fabyc wrote: 
>> > Hello everybody. 
>> > 
>> > I have installed these libs: 
>> > apt-get install libreoffice-java-common python-uno 
>> > 
>> > As a test, in "Administration->User Interface->Actions->Reports" I set 
>> the 
>> > "Extension" field the 
>> > option "PDF" for the "Labels" report. 
>> > 
>> > When I tried to print to PDF, I get this error: 
>> > 
>> > Traceback (most recent call last): 
>> >   File "/trytond/protocols/jsonrpc.py", line 125, in 
>> _marshaled_dispatch 
>> >     response['result'] = dispatch_method(method, params) 
>> >   File "/trytond/protocols/jsonrpc.py", line 158, in _dispatch 
>> >     res = dispatch(*args) 
>> >   File "/trytond/protocols/dispatcher.py", line 159, in dispatch 
>> >     result = rpc.result(meth(*c_args, **c_kwargs)) 
>> >   File "/trytond/report/report.py", line 128, in execute 
>> >     type, data = cls.parse(action_report, records, data, {}) 
>> >   File "/trytond/report/report.py", line 284, in parse 
>> >     data = cls.unoconv(data, report.template_extension, output_format) 
>> >   File "/trytond/report/report.py", line 301, in unoconv 
>> >     proc = subprocess.Popen(cmd, stdout=subprocess.PIPE) 
>> >   File "/subprocess.py", line 679, in __init__ 
>> >     errread, errwrite) 
>> >   File "/subprocess.py", line 1259, in _execute_child 
>> >     raise child_exceptionOSError: [Errno 2] No such file or directory 
>> > 
>> > 
>> > 
>> > It is the same error when I try to print to PDF any other report. I 
>> tested 
>> > in tryton 3.2, 3.4. 
>> > 
>> > I installed this lib too: "apt-get install unoconv" and the error 
>> persists. 
>> > 
>> > Is there something I'm missing? 
>>
>> It looks like unoconv executable is not in the $PATH. 
>>
>
> You're right.
>  
> That solved the problem.
>
> Thank you
>
> --
> Regards
>

Reply via email to