c2c-oerpscenario team mailing list archive
-
c2c-oerpscenario team
-
Mailing list archive
-
Message #01711
[Bug 668781] Re: TypeError: function takes exactly 5 arguments (1 given)
*** This bug is a duplicate of bug 537449 ***
https://bugs.launchpad.net/bugs/537449
Apply patches below
https://bugs.launchpad.net/openobject-server/+bug/662598/+attachment/1699497/+files/report_unicode.patch
https://bugs.launchpad.net/openobject-server/+bug/662598/+attachment/1700325/+files/report_unicode_trunk.patch
The log file show new error "ValueError: can only parse strings"
[2010-10-31 02:56:49,374][demo60] ERROR:web-services:[01]: Exception: can only parse strings
[2010-10-31 02:56:49,374][demo60] ERROR:web-services:[02]: Traceback (most recent call last):
[2010-10-31 02:56:49,374][demo60] ERROR:web-services:[03]: File "/var/local/software/openerp-server-6.0.0-rc1/bin/service/web_services.py", line 711, in go
[2010-10-31 02:56:49,374][demo60] ERROR:web-services:[04]: (result, format) = obj.create(cr, uid, ids, datas, context)
[2010-10-31 02:56:49,374][demo60] ERROR:web-services:[05]: File "/var/local/software/openerp-server-6.0.0-rc1/bin/report/report_sxw.py", line 403, in create
[2010-10-31 02:56:49,374][demo60] ERROR:web-services:[06]: fnct_ret = fnct(cr, uid, ids, data, report_xml, context)
[2010-10-31 02:56:49,375][demo60] ERROR:web-services:[07]: File "/var/local/software/openerp-server-6.0.0-rc1/bin/report/report_sxw.py", line 466, in create_source_pdf
[2010-10-31 02:56:49,375][demo60] ERROR:web-services:[08]: return self.create_single_pdf(cr, uid, ids, data, report_xml, context)
[2010-10-31 02:56:49,375][demo60] ERROR:web-services:[09]: File "/var/local/software/openerp-server-6.0.0-rc1/bin/report/report_sxw.py", line 483, in create_single_pdf
[2010-10-31 02:56:49,375][demo60] ERROR:web-services:[10]: rml_parser._add_header(processed_rml, self.header)
[2010-10-31 02:56:49,375][demo60] ERROR:web-services:[11]: File "/var/local/software/openerp-server-6.0.0-rc1/bin/report/report_sxw.py", line 334, in _add_header
[2010-10-31 02:56:49,375][demo60] ERROR:web-services:[12]: head_dom = etree.XML(rml_head)
[2010-10-31 02:56:49,375][demo60] ERROR:web-services:[13]: File "lxml.etree.pyx", line 2512, in lxml.etree.XML (src/lxml/lxml.etree.c:48057)
[2010-10-31 02:56:49,376][demo60] ERROR:web-services:[14]: File "parser.pxi", line 1542, in lxml.etree._parseMemoryDocument (src/lxml/lxml.etree.c:71774)
[2010-10-31 02:56:49,376][demo60] ERROR:web-services:[15]: ValueError: can only parse strings
--
TypeError: function takes exactly 5 arguments (1 given)
https://bugs.launchpad.net/bugs/668781
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
Status in OpenObject Addons Modules: New
Bug description:
When loading a pristine database with several modules, I got the following error.
This error subsequently causes exceptions in all the reports
[2010-10-30 22:31:54,625][test60] DEBUG:tests.mrp:Exception during evaluation of !python block in yaml_file /var/local/software/openerp-v6.0dev/openobject-server/bin/addons/mrp/test/mrp_report.yml.
Traceback (most recent call last):
File "/var/local/software/openerp-v6.0dev/openobject-server/bin/tools/yaml_import.py", line 412, in process_python
unsafe_eval(code_obj, {'ref': self.get_id}, code_context)
File "/var/local/software/openerp-v6.0dev/openobject-server/bin/addons/mrp/test/mrp_report.yml", line 2, in <module>
In order to test the PDF reports defined on a MRP, we will print a BOM Structure Report
File "/var/local/software/openerp-v6.0dev/openobject-server/bin/report/interface.py", line 100, in create
pdf = create_doc(rml, title=self.title)
File "/var/local/software/openerp-v6.0dev/openobject-server/bin/report/interface.py", line 190, in create_pdf
obj.render()
File "/var/local/software/openerp-v6.0dev/openobject-server/bin/report/render/render.py", line 49, in render
result = self._render()
File "/var/local/software/openerp-v6.0dev/openobject-server/bin/report/render/rml.py", line 42, in _render
return rml2pdf.parseNode(self.rml, self.localcontext, images=self.bin_datas, path=self.path,title=self.title)
File "/var/local/software/openerp-v6.0dev/openobject-server/bin/addons/base_report_unicode/__init__.py", line 80, in convert2TrueType
return method(data, args[1:] if len(args) > 2 else args[1], **argv)
File "/var/local/software/openerp-v6.0dev/openobject-server/bin/report/render/rml2pdf/trml2pdf.py", line 892, in parseNode
r.render(fp)
File "/var/local/software/openerp-v6.0dev/openobject-server/bin/report/render/rml2pdf/trml2pdf.py", line 273, in render
pt_obj.render(el)
File "/var/local/software/openerp-v6.0dev/openobject-server/bin/report/render/rml2pdf/trml2pdf.py", line 877, in render
self.doc_tmpl.build(fis,canvasmaker=NumberedCanvas)
File "/usr/lib/python2.6/dist-packages/reportlab/platypus/doctemplate.py", line 874, in build
self.clean_hanging()
File "/usr/lib/python2.6/dist-packages/reportlab/platypus/doctemplate.py", line 509, in clean_hanging
self.handle_flowable(self._hanging)
File "/usr/lib/python2.6/dist-packages/reportlab/platypus/doctemplate.py", line 756, in handle_flowable
f.apply(self)
File "/usr/lib/python2.6/dist-packages/reportlab/platypus/doctemplate.py", line 140, in apply
getattr(doc,arn)(*args)
File "/usr/lib/python2.6/dist-packages/reportlab/platypus/doctemplate.py", line 534, in handle_pageBegin
self.pageTemplate.onPage(self.canv,self)
File "/var/local/software/openerp-v6.0dev/openobject-server/bin/report/render/rml2pdf/trml2pdf.py", line 528, in render
cnv.render(self.node)
File "/var/local/software/openerp-v6.0dev/openobject-server/bin/report/render/rml2pdf/trml2pdf.py", line 513, in render
tags[n.tag](n)
File "/var/local/software/openerp-v6.0dev/openobject-server/bin/report/render/rml2pdf/trml2pdf.py", line 317, in _drawString
text=self._textual(node, **v)
File "/var/local/software/openerp-v6.0dev/openobject-server/bin/report/render/rml2pdf/trml2pdf.py", line 298, in _textual
rc = utils._process_text(self, text)
File "/var/local/software/openerp-v6.0dev/openobject-server/bin/report/render/rml2pdf/utils.py", line 120, in _process_text
result += unicode(self.localcontext.get('translate', lambda x:x)(sps.pop(0)))
TypeError: function takes exactly 5 arguments (1 given)
[2010-10-30 22:31:54,626][test60] ERROR:tests.mrp:function takes exactly 5 arguments (1 given)
Traceback (most recent call last):
File "/var/local/software/openerp-v6.0dev/openobject-server/bin/tools/yaml_import.py", line 723, in process
self._process_node(node)
File "/var/local/software/openerp-v6.0dev/openobject-server/bin/tools/yaml_import.py", line 738, in _process_node
self.process_python(node)
File "/var/local/software/openerp-v6.0dev/openobject-server/bin/tools/yaml_import.py", line 412, in process_python
unsafe_eval(code_obj, {'ref': self.get_id}, code_context)
File "/var/local/software/openerp-v6.0dev/openobject-server/bin/addons/mrp/test/mrp_report.yml", line 2, in <module>
In order to test the PDF reports defined on a MRP, we will print a BOM Structure Report
File "/var/local/software/openerp-v6.0dev/openobject-server/bin/report/interface.py", line 100, in create
pdf = create_doc(rml, title=self.title)
File "/var/local/software/openerp-v6.0dev/openobject-server/bin/report/interface.py", line 190, in create_pdf
obj.render()
File "/var/local/software/openerp-v6.0dev/openobject-server/bin/report/render/render.py", line 49, in render
result = self._render()
File "/var/local/software/openerp-v6.0dev/openobject-server/bin/report/render/rml.py", line 42, in _render
return rml2pdf.parseNode(self.rml, self.localcontext, images=self.bin_datas, path=self.path,title=self.title)
File "/var/local/software/openerp-v6.0dev/openobject-server/bin/addons/base_report_unicode/__init__.py", line 80, in convert2TrueType
return method(data, args[1:] if len(args) > 2 else args[1], **argv)
File "/var/local/software/openerp-v6.0dev/openobject-server/bin/report/render/rml2pdf/trml2pdf.py", line 892, in parseNode
r.render(fp)
File "/var/local/software/openerp-v6.0dev/openobject-server/bin/report/render/rml2pdf/trml2pdf.py", line 273, in render
pt_obj.render(el)
File "/var/local/software/openerp-v6.0dev/openobject-server/bin/report/render/rml2pdf/trml2pdf.py", line 877, in render
self.doc_tmpl.build(fis,canvasmaker=NumberedCanvas)
File "/usr/lib/python2.6/dist-packages/reportlab/platypus/doctemplate.py", line 874, in build
self.clean_hanging()
File "/usr/lib/python2.6/dist-packages/reportlab/platypus/doctemplate.py", line 509, in clean_hanging
self.handle_flowable(self._hanging)
File "/usr/lib/python2.6/dist-packages/reportlab/platypus/doctemplate.py", line 756, in handle_flowable
f.apply(self)
File "/usr/lib/python2.6/dist-packages/reportlab/platypus/doctemplate.py", line 140, in apply
getattr(doc,arn)(*args)
File "/usr/lib/python2.6/dist-packages/reportlab/platypus/doctemplate.py", line 534, in handle_pageBegin
self.pageTemplate.onPage(self.canv,self)
File "/var/local/software/openerp-v6.0dev/openobject-server/bin/report/render/rml2pdf/trml2pdf.py", line 528, in render
cnv.render(self.node)
File "/var/local/software/openerp-v6.0dev/openobject-server/bin/report/render/rml2pdf/trml2pdf.py", line 513, in render
tags[n.tag](n)
File "/var/local/software/openerp-v6.0dev/openobject-server/bin/report/render/rml2pdf/trml2pdf.py", line 317, in _drawString
text=self._textual(node, **v)
File "/var/local/software/openerp-v6.0dev/openobject-server/bin/report/render/rml2pdf/trml2pdf.py", line 298, in _textual
rc = utils._process_text(self, text)
File "/var/local/software/openerp-v6.0dev/openobject-server/bin/report/render/rml2pdf/utils.py", line 120, in _process_text
result += unicode(self.localcontext.get('translate', lambda x:x)(sps.pop(0)))
TypeError: function takes exactly 5 arguments (1 given)
[2010-10-30 22:31:54,626][test60] TEST:ERROR:function takes exactly 5 arguments (1 given)
crclinic@crclinic-server:/var/local/software/openerp-v6.0dev/openobject-server$ bzr log -l 1
------------------------------------------------------------
revno: 2962
committer: Launchpad Translations on behalf of openerp
branch nick: openobject-server
timestamp: Fri 2010-10-29 05:27:00 +0000
message:
Launchpad automatic translations update.
crclinic@crclinic-server:/var/local/software/openerp-v6.0dev/openobject-server$ bzr info
Standalone tree (format: 2a)
Location:
branch root: .
Related branches:
parent branch: http://bazaar.launchpad.net/~openerp/openobject-server/trunk/
References