XMLSyntaxError

Bug #515434 reported by Corentin Pouhet-Brunerie - http://www.Smile.fr
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Report OpenOffice
Fix Released
Low
sraps (Alistek)

Bug Description

Revision: 3

When I generated the report "report_openoffice_samples.account_invoice", I met the following error:

File: "addons/report_openoffice/report_openoffice.py", line 224, in create_single_pdf
[2010-02-01 11:50:48,644] ERROR:web-services:[26]: processed_rml = self.preprocess_rml(etree.XML(rml),report_xml.report_type)
[2010-02-01 11:50:48,644] ERROR:web-services:[27]: File "lxml.etree.pyx", line 2421, in lxml.etree.XML (src/lxml/lxml.etree.c:23802)
[2010-02-01 11:50:48,645] ERROR:web-services:[28]: File "parser.pxi", line 1510, in lxml.etree._parseMemoryDocument (src/lxml/lxml.etree.c:63925)
[2010-02-01 11:50:48,645] ERROR:web-services:[29]: File "parser.pxi", line 1389, in lxml.etree._parseDoc (src/lxml/lxml.etree.c:62857)
[2010-02-01 11:50:48,645] ERROR:web-services:[30]: File "parser.pxi", line 931, in lxml.etree._BaseParser._parseDoc (src/lxml/lxml.etree.c:60016)
[2010-02-01 11:50:48,645] ERROR:web-services:[31]: File "parser.pxi", line 542, in lxml.etree._ParserContext._handleParseResultDoc (src/lxml/lxml.etree.c:56659)
[2010-02-01 11:50:48,645] ERROR:web-services:[32]: File "parser.pxi", line 628, in lxml.etree._handleParseResult (src/lxml/lxml.etree.c:57504)
[2010-02-01 11:50:48,645] ERROR:web-services:[33]: File "parser.pxi", line 568, in lxml.etree._raiseParseError (src/lxml/lxml.etree.c:56902)
[2010-02-01 11:50:48,645] ERROR:web-services:[34]: XMLSyntaxError: Start tag expected, '<' not found, line 1, column 1

Changed in report-openoffice:
status: New → Confirmed
importance: Undecided → Low
assignee: nobody → sraps (KN dati) (erpsraps)
milestone: none → 1.0
Revision history for this message
sraps (Alistek) (erpsraps) wrote :

Sample reports are outdated by now. We will try to make them up to date, on 1.0 version release.

Changed in report-openoffice:
status: Confirmed → Fix Released
Revision history for this message
Bruno Hostalery (istf) wrote :

Don't know if it is the same problem, but looks like.
Make module with report_openoffice report.
Module works well, print report is ok.

but when i try to make translation in french and obtain (from export translation wizard) :
Traceback (most recent call last):
  File "/opt/openerp/istf/openerp-server-5.0.12/bin/netsvc.py", line 247, in dispatch
    result = LocalService(service_name)(method, *params)
  File "/opt/openerp/istf/openerp-server-5.0.12/bin/netsvc.py", line 76, in __call__
    return getattr(self, method)(*params)
  File "/opt/openerp/istf/openerp-server-5.0.12/bin/service/web_services.py", line 577, in execute
    res = service.execute(db, uid, object, method, *args)
  File "/opt/openerp/istf/openerp-server-5.0.12/bin/osv/osv.py", line 58, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/opt/openerp/istf/openerp-server-5.0.12/bin/osv/osv.py", line 119, in execute
    res = pool.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/opt/openerp/istf/openerp-server-5.0.12/bin/osv/osv.py", line 111, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/opt/openerp/istf/server/bin/addons/base/module/wizard/wizard_export_lang.py", line 53, in act_getfile
    tools.trans_export(this.lang, mods, buf, this.format, dbname=cr.dbname)
  File "/opt/openerp/istf/openerp-server-5.0.12/bin/tools/translate.py", line 351, in trans_export
    trans = trans_generate(lang, modules, dbname)
  File "/opt/openerp/istf/openerp-server-5.0.12/bin/tools/translate.py", line 543, in trans_generate
    d = etree.XML(xmlstr)
  File "lxml.etree.pyx", line 2512, in lxml.etree.XML (src/lxml/lxml.etree.c:48057)
  File "parser.pxi", line 1545, in lxml.etree._parseMemoryDocument (src/lxml/lxml.etree.c:71812)
  File "parser.pxi", line 1424, in lxml.etree._parseDoc (src/lxml/lxml.etree.c:70673)
  File "parser.pxi", line 938, in lxml.etree._BaseParser._parseDoc (src/lxml/lxml.etree.c:67442)
  File "parser.pxi", line 539, in lxml.etree._ParserContext._handleParseResultDoc (src/lxml/lxml.etree.c:63824)
  File "parser.pxi", line 625, in lxml.etree._handleParseResult (src/lxml/lxml.etree.c:64745)
  File "parser.pxi", line 565, in lxml.etree._raiseParseError (src/lxml/lxml.etree.c:64088)
XMLSyntaxError: Start tag expected, '<' not found, line 1, column 1

I comment in __terp__ line in which i define xml for the declaration of report_openoffice, no error.

i forget :
openerp 5.0.12
report_openoffice 1.0

Revision history for this message
Max Pippi (mpippi) wrote :

@Bruno
The problem comes from tools/translate.py module.
When parsing the xml where your report is declared, openerp expects to find xml data at the path specified in the field named "report_rml", but the path actually points to an odt file.
Temporary fixed patching translate.py module and manually handling translations inside odt files.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.