我正在为Odoo 8.0与JasperReports合作,并从我这边打印产品库存卡报告并使用参考文档。
我得到了以下错误:
Premature end of data in tag jasperReport line 2, line 391, column 1
<class 'lxml.etree.XMLSyntaxError'>,Premature end of data in tag jasperReport line 2, line 391, column 1,<traceback object at 0x7f79283d8a28>
终端TraceBack:
Traceback (most recent call last):
File "/home/user1/workspace/8.0/openerp/service/report.py", line 93, in go
result, format = openerp.report.render_report(cr, uid, ids, object, datas, context)
File "/home/user1/workspace/8.0/openerp/report/__init__.py", line 40, in render_report
return registry['ir.actions.report.xml'].render_report(cr, uid, ids, name, data, context)
File "/home/user1/workspace/8.0/openerp/api.py", line 268, in wrapper
return old_api(self, *args, **kwargs)
File "/home/user1/workspace/8.0/openerp/addons/base/ir/ir_actions.py", line 156, in render_report
return new_report.create(cr, uid, res_ids, data, context)
File "/home/user1/workspace/8.0/openerp/addons/jasper_reports/jasper_report.py", line 298, in create
return r.execute()
File "/home/user1/workspace/8.0/openerp/addons/jasper_reports/jasper_report.py", line 107, in execute
self.report = JasperReport(self.reportPath)
File "/home/user1/workspace/8.0/openerp/addons/jasper_reports/JasperReports/JasperReport.py", line 65, in __init__
self.extractProperties()
File "/home/user1/workspace/8.0/openerp/addons/jasper_reports/JasperReports/JasperReport.py", line 137, in extractProperties
doc = etree.parse(self._reportPath)
File "lxml.etree.pyx", line 3310, in lxml.etree.parse (src/lxml/lxml.etree.c:72517)
File "parser.pxi", line 1791, in lxml.etree._parseDocument (src/lxml/lxml.etree.c:105979)
File "parser.pxi", line 1817, in lxml.etree._parseDocumentFromURL (src/lxml/lxml.etree.c:106278)
File "parser.pxi", line 1721, in lxml.etree._parseDocFromFile (src/lxml/lxml.etree.c:105277)
File "parser.pxi", line 1122, in lxml.etree._BaseParser._parseDocFromFile (src/lxml/lxml.etree.c:100227)
File "parser.pxi", line 580, in lxml.etree._ParserContext._handleParseResultDoc (src/lxml/lxml.etree.c:94350)
File "parser.pxi", line 690, in lxml.etree._handleParseResult (src/lxml/lxml.etree.c:95786)
File "parser.pxi", line 620, in lxml.etree._raiseParseError (src/lxml/lxml.etree.c:94853)
XMLSyntaxError: Premature end of data in tag jasperReport line 2, line 391, column 1
2016-06-15 11:43:12,805 25307 ERROR v8_mig_last openerp.addons.web.controllers.main: An exception occured during an http request
Traceback (most recent call last):
File "/home/user1/workspace/8.0/openerp/addons/web/controllers/main.py", line 70, in wrap
return f(*args, **kwargs)
File "/home/user1/workspace/8.0/openerp/addons/web/controllers/main.py", line 1575, in index
request.session.db, request.session.uid, request.session.password, report_id)
File "/home/user1/workspace/8.0/openerp/http.py", line 881, in proxy_method
result = dispatch_rpc(self.service_name, method, args)
File "/home/user1/workspace/8.0/openerp/http.py", line 115, in dispatch_rpc
result = dispatch(method, params)
File "/home/user1/workspace/8.0/openerp/service/report.py", line 34, in dispatch
res = fn(db, uid, *params)
File "/home/user1/workspace/8.0/openerp/service/report.py", line 141, in exp_report_get
return _check_report(report_id)
File "/home/user1/workspace/8.0/openerp/service/report.py", line 119, in _check_report
raise openerp.osv.orm.except_orm(exc.message, exc.traceback)
except_orm: (u'Premature end of data in tag jasperReport line 2, line 391, column 1', (<class 'lxml.etree.XMLSyntaxError'>, XMLSyntaxError(u'Premature end of data in tag jasperReport line 2, line 391, column 1',), <traceback object at 0x7f7928109950>))
有没有办法解决我的问题。?
所有配置和安装均由以下参考完成。
我使用了下面提到的来源,安装和文档指南: