On 25 May 03:56, Antonio Roncero wrote:
> 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?

You are not fixing anything as you are just avoiding to test the return
status of the command.
You have to fix the error logged to avoid unoconv to return non-zero
status code.

PS: Please don't top-post nor hijack other threads on this mailing list,
see http://groups.tryton.org/netiquette

-- 
Cédric Krier - B2CK SPRL
Email/Jabber: [email protected]
Tel: +32 472 54 46 59
Website: http://www.b2ck.com/

Reply via email to