← Back to team overview

openerp-india team mailing list archive

[Bug 682560] Re: ValueError: redefining named object: 'toUnicodeCMap:AAAAAA+DejaVuSans'

 

Hello, sorry for re-opening, but I am still facing the same problem with
OE 6.1.

Steps to reproduce the problem are simple:

1) create database and install base_report_designer
2) create any report with LibreOffice (I created simple report showing res.partner/Name)
3) try to display the report on web client

Searching on Google gives me an idea that there could be a problem with
reportlab, because the same message that is shown in error window was
reported on reportlab mailing list. Just guessing...

Initially, I was thinking that the error can be caused by creating a
non-english database, but this was wrong. It occurs even on english
database. My OE is running on Ubuntu with cs_CZ.UTF8 system locale set.

If anybody is interested in hunting the problem, I could provide a ssh
access to the machine where it is installed. Just let me know.

-- 
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Addons.
https://bugs.launchpad.net/bugs/682560

Title:
  ValueError: redefining named object: 'toUnicodeCMap:AAAAAA+DejaVuSans'

Status in OpenERP Addons (modules):
  Invalid

Bug description:
  Error generated when loading module account for a newly created DB

  [2010-11-29 13:00:08,498][dev60] TEST:tests.account:In order to test the PDF reports defined on an invoice, we will print an Invoice Report
  [2010-11-29 13:00:09,199][dev60] DEBUG:tests.account:Exception during evaluation of !python block in yaml_file /var/local/software/openerp-v6.0dev/server/bin/addons/account/test/account_report.yml.
  Traceback (most recent call last):
    File "/var/local/software/openerp-v6.0dev/server/bin/tools/yaml_import.py", line 410, in process_python
      unsafe_eval(code_obj, {'ref': self.get_id}, code_context)
    File "/var/local/software/openerp-v6.0dev/server/bin/addons/account/test/account_report.yml", line 2, in <module>
      In order to test the PDF reports defined on an invoice, we will create a Invoice Record
    File "/var/local/software/openerp-v6.0dev/server/bin/report/report_sxw.py", line 405, in create
      fnct_ret = fnct(cr, uid, ids, data, report_xml, context)
    File "/var/local/software/openerp-v6.0dev/server/bin/report/report_sxw.py", line 439, in create_source_pdf
      result = self.create_single_pdf(cr, uid, [obj.id], data, report_xml, context)
    File "/var/local/software/openerp-v6.0dev/server/bin/report/report_sxw.py", line 490, in create_single_pdf
      pdf = create_doc(etree.tostring(processed_rml),rml_parser.localcontext,logo,title.encode('utf8'))
    File "/var/local/software/openerp-v6.0dev/server/bin/report/interface.py", line 190, in create_pdf
      obj.render()
    File "/var/local/software/openerp-v6.0dev/server/bin/report/render/render.py", line 49, in render
      result = self._render()
    File "/var/local/software/openerp-v6.0dev/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/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/server/bin/report/render/rml2pdf/trml2pdf.py", line 931, in parseNode
      r.render(fp)
    File "/var/local/software/openerp-v6.0dev/server/bin/report/render/rml2pdf/trml2pdf.py", line 279, in render
      pt_obj.render(el)
    File "/var/local/software/openerp-v6.0dev/server/bin/report/render/rml2pdf/trml2pdf.py", line 915, in render
      self.doc_tmpl.build(fis)
    File "/usr/lib/python2.6/dist-packages/reportlab/platypus/doctemplate.py", line 903, in build
     self._endBuild()
    File "/usr/lib/python2.6/dist-packages/reportlab/platypus/doctemplate.py", line 845, in _endBuild
      if getattr(self,'_doSave',1): self.canv.save()
    File "/usr/lib/python2.6/dist-packages/reportlab/pdfgen/canvas.py", line 1091, in save
      self._doc.SaveToFile(self._filename, self)
    File "/usr/lib/python2.6/dist-packages/reportlab/pdfbase/pdfdoc.py", line 235, in SaveToFile
      f.write(self.GetPDFData(canvas))
    File "/usr/lib/python2.6/dist-packages/reportlab/pdfbase/pdfdoc.py", line 247, in GetPDFData
      fnt.addObjects(self)
    File "/usr/lib/python2.6/dist-packages/reportlab/pdfbase/ttfonts.py", line 1121, in addObjects
      pdfFont.ToUnicode = doc.Reference(cmapStream, 'toUnicodeCMap:' + baseFontName)
    File "/usr/lib/python2.6/dist-packages/reportlab/pdfbase/pdfdoc.py", line 507, in Reference
       raise ValueError, "redefining named object: "+repr(name)
  ValueError: redefining named object: 'toUnicodeCMap:AAAAAA+DejaVuSans'
  [2010-11-29 13:00:09,199][dev60] ERROR:tests.account:redefining named object: 'toUnicodeCMap:AAAAAA+DejaVuSans'
  Traceback (most recent call last):
    File "/var/local/software/openerp-v6.0dev/server/bin/tools/yaml_import.py", line 721, in process
      self._process_node(node)
    File "/var/local/software/openerp-v6.0dev/server/bin/tools/yaml_import.py", line 736, in _process_node
      self.process_python(node)
    File "/var/local/software/openerp-v6.0dev/server/bin/tools/yaml_import.py", line 410, in process_python
      unsafe_eval(code_obj, {'ref': self.get_id}, code_context)
    File "/var/local/software/openerp-v6.0dev/server/bin/addons/account/test/account_report.yml", line 2, in <module>
      In order to test the PDF reports defined on an invoice, we will create a Invoice Record
    File "/var/local/software/openerp-v6.0dev/server/bin/report/report_sxw.py", line 405, in create
      fnct_ret = fnct(cr, uid, ids, data, report_xml, context)
    File "/var/local/software/openerp-v6.0dev/server/bin/report/report_sxw.py", line 439, in create_source_pdf
      result = self.create_single_pdf(cr, uid, [obj.id], data, report_xml, context)
    File "/var/local/software/openerp-v6.0dev/server/bin/report/report_sxw.py", line 490, in create_single_pdf
      pdf = create_doc(etree.tostring(processed_rml),rml_parser.localcontext,logo,title.encode('utf8'))
    File "/var/local/software/openerp-v6.0dev/server/bin/report/interface.py", line 190, in create_pdf
      obj.render()
    File "/var/local/software/openerp-v6.0dev/server/bin/report/render/render.py", line 49, in render
      result = self._render()
    File "/var/local/software/openerp-v6.0dev/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/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/server/bin/report/render/rml2pdf/trml2pdf.py", line 931, in parseNode
      r.render(fp)
    File "/var/local/software/openerp-v6.0dev/server/bin/report/render/rml2pdf/trml2pdf.py", line 279, in render
      pt_obj.render(el)
    File "/var/local/software/openerp-v6.0dev/server/bin/report/render/rml2pdf/trml2pdf.py", line 915, in render
      self.doc_tmpl.build(fis)
    File "/usr/lib/python2.6/dist-packages/reportlab/platypus/doctemplate.py", line 903, in build
      self._endBuild()
    File "/usr/lib/python2.6/dist-packages/reportlab/platypus/doctemplate.py", line 845, in _endBuild
      if getattr(self,'_doSave',1): self.canv.save()
    File "/usr/lib/python2.6/dist-packages/reportlab/pdfgen/canvas.py", line 1091, in save
      self._doc.SaveToFile(self._filename, self)
    File "/usr/lib/python2.6/dist-packages/reportlab/pdfbase/pdfdoc.py", line 235, in SaveToFile
      f.write(self.GetPDFData(canvas))
    File "/usr/lib/python2.6/dist-packages/reportlab/pdfbase/pdfdoc.py", line 247, in GetPDFData
      fnt.addObjects(self)
    File "/usr/lib/python2.6/dist-packages/reportlab/pdfbase/ttfonts.py", line 1121, in addObjects
      pdfFont.ToUnicode = doc.Reference(cmapStream, 'toUnicodeCMap:' + baseFontName)
    File "/usr/lib/python2.6/dist-packages/reportlab/pdfbase/pdfdoc.py", line 507, in Reference
      raise ValueError, "redefining named object: "+repr(name)
  ValueError: redefining named object: 'toUnicodeCMap:AAAAAA+DejaVuSans'
  [2010-11-29 13:00:09,200][dev60] TEST:ERROR:redefining named object: 'toUnicodeCMap:AAAAAA+DejaVuSans'
  [2010-11-29 13:00:09,552][dev60] INFO:i18n:module account: loading translation file for language vi
  [2010-11-29 13:00:09,552][dev60] INFO:i18n:loading /var/local/software/openerp-v6.0dev/server/bin/addons/account/i18n/vi.po

To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/682560/+subscriptions