It is currently Sat Feb 11, 2012 10:43 am

All times are UTC + 2 hours




Post new topic Reply to topic  [ 12 posts ] 
Author Message
 Post subject: Print Report - Unicode is not supported
PostPosted: Fri Feb 19, 2010 5:26 pm 
Offline

Joined: Fri Nov 16, 2007 12:47 pm
Posts: 63
Location: Munich
Hi,

I have created my own report.

But I cant print it, if I try it I get the error "Unicode is not supported".

The whole error is:
Code:
  File "/usr/lib/python2.4/site-packages/openerp-server2/openerp-server/service/web_services.py", line 600, in go
    (result, format) = obj.create(cr, uid, ids, datas, context)
  File "/usr/lib/python2.4/site-packages/openerp-server2/openerp-server/report/printscreen/ps_list.py", line 74, in create
    fields_order = self._parse_string(result['arch'])
  File "/usr/lib/python2.4/site-packages/openerp-server2/openerp-server/report/printscreen/ps_list.py", line 54, in _parse_string
    dom = minidom.parseString(unicode(view, 'utf-8').encode('utf-8'))
TypeError: decoding Unicode is not supported


Someone know what to do?

Thx for your reply.

regards
PHZ


Top
 Profile  
 
 Post subject: Re: Print Report - Unicode is not supported
PostPosted: Fri Feb 19, 2010 5:59 pm 
Offline

Joined: Mon Feb 01, 2010 2:21 pm
Posts: 14
Quote:
Hi,

I have created my own report.

But I cant print it, if I try it I get the error "Unicode is not supported".

The whole error is:
Code:
  File "/usr/lib/python2.4/site-packages/openerp-server2/openerp-server/service/web_services.py", line 600, in go
    (result, format) = obj.create(cr, uid, ids, datas, context)
  File "/usr/lib/python2.4/site-packages/openerp-server2/openerp-server/report/printscreen/ps_list.py", line 74, in create
    fields_order = self._parse_string(result['arch'])
  File "/usr/lib/python2.4/site-packages/openerp-server2/openerp-server/report/printscreen/ps_list.py", line 54, in _parse_string
    dom = minidom.parseString(unicode(view, 'utf-8').encode('utf-8'))
TypeError: decoding Unicode is not supported


Someone know what to do?

Thx for your reply.

regards
PHZ

Did you install the report_unicode module from addons-extra?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 22, 2010 3:23 pm 
Offline

Joined: Fri Nov 16, 2007 12:47 pm
Posts: 63
Location: Munich
thx for your reply.

I've installed the base_report_unicode but there is no change...

Do you have another idea?

regards
PHZ


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 24, 2010 9:17 pm 
Offline

Joined: Thu Mar 12, 2009 4:11 pm
Posts: 47
Location: PL
Note that this module has to be in version 1.1. It has to be unzipped to addons directory. And you have to reload modules, restart a server etc. Search internet for other tips. This module works.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 26, 2010 6:20 pm 
Offline

Joined: Fri Nov 16, 2007 12:47 pm
Posts: 63
Location: Munich
Hi,

thx for your help.

What i've done is:

Download the new 2 files from

http://bazaar.launchpad.net/~openerp-co ... t_unicode/

Overwrite these files at the "addons" folder and restart the server.

But I can't print my view! The error is:

Code:
File "service\web_services.pyo", line 687, in go
  File "report\printscreen\ps_list.pyo", line 74, in create
  File "report\printscreen\ps_list.pyo", line 54, in _parse_string
  File "lxml.etree.pyx", line 2416, in lxml.etree.XML (src/lxml/lxml.etree.c:23987)
  File "parser.pxi", line 1502, in lxml.etree._parseMemoryDocument (src/lxml/lxml.etree.c:64083)
ValueError: Unicode strings with encoding declaration are not supported.


MAC shows the following error:
Code:
Traceback (most recent call last):
  File "service\web_services.pyo", line 687, in go
  File "report\printscreen\ps_list.pyo", line 85, in create
  File "report\printscreen\ps_list.pyo", line 242, in _create_table
  File "report\render\render.pyo", line 50, in render
  File "report\render\rml.pyo", line 41, in _render
  File "report\render\rml2pdf\trml2pdf.pyo", line 780, in parseNode
  File "report\render\rml2pdf\trml2pdf.pyo", line 195, in render
  File "report\render\rml2pdf\trml2pdf.pyo", line 774, in render
  File "reportlab\platypus\doctemplate.pyo", line 756, in build
  File "reportlab\platypus\doctemplate.pyo", line 678, in handle_flowable
LayoutError: Flowable <Paragraph>Report too large on page 2


Did I forget something?

Thx again.

regards
philipp


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 26, 2010 11:27 pm 
Offline

Joined: Mon Feb 01, 2010 2:21 pm
Posts: 14
PHZ wrote:
Hi,

thx for your help.

What i've done is:

Download the new 2 files from

http://bazaar.launchpad.net/~openerp-co ... t_unicode/

Overwrite these files at the "addons" folder and restart the server.

But I can't print my view! The error is:

Code:
File "service\web_services.pyo", line 687, in go
  File "report\printscreen\ps_list.pyo", line 74, in create
  File "report\printscreen\ps_list.pyo", line 54, in _parse_string
  File "lxml.etree.pyx", line 2416, in lxml.etree.XML (src/lxml/lxml.etree.c:23987)
  File "parser.pxi", line 1502, in lxml.etree._parseMemoryDocument (src/lxml/lxml.etree.c:64083)
ValueError: Unicode strings with encoding declaration are not supported.


MAC shows the following error:
Code:
Traceback (most recent call last):
  File "service\web_services.pyo", line 687, in go
  File "report\printscreen\ps_list.pyo", line 85, in create
  File "report\printscreen\ps_list.pyo", line 242, in _create_table
  File "report\render\render.pyo", line 50, in render
  File "report\render\rml.pyo", line 41, in _render
  File "report\render\rml2pdf\trml2pdf.pyo", line 780, in parseNode
  File "report\render\rml2pdf\trml2pdf.pyo", line 195, in render
  File "report\render\rml2pdf\trml2pdf.pyo", line 774, in render
  File "reportlab\platypus\doctemplate.pyo", line 756, in build
  File "reportlab\platypus\doctemplate.pyo", line 678, in handle_flowable
LayoutError: Flowable <Paragraph>Report too large on page 2


Did I forget something?

Thx again.

regards
philipp


1. Download entire directory base_report_unicode. I prefer using bzr tool.
2. Copy this directory into server/bin/addons
3. Go to Administration/Modules/Refresh
4. Select base_report_unicode in list of modules
5. Press "Install" button


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 01, 2010 8:51 pm 
Offline

Joined: Fri Jan 04, 2008 10:16 am
Posts: 16
Hi i have installed this for phz and now we get the following error if we print any custom report.

Code:
Traceback (most recent call last):
  File "/usr/lib/python2.4/site-packages/openerp-server2/openerp-server/service/web_services.py", line 600, in go
    (result, format) = obj.create(cr, uid, ids, datas, context)
  File "/usr/lib/python2.4/site-packages/openerp-server2/openerp-server/report/printscreen/ps_list.py", line 76, in create
    res = self._create_table(uid, datas['ids'], result['fields'], fields_order, rows, context, model_desc)
  File "/usr/lib/python2.4/site-packages/openerp-server2/openerp-server/report/printscreen/ps_list.py", line 192, in _create_table
    if tsum[f] != None:
IndexError: list index out of range


Do you know something about this error?

by jada


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 02, 2010 7:05 pm 
Offline

Joined: Fri Jan 04, 2008 10:16 am
Posts: 16
Hi,

phz and i tested it on a clone of our server and installed the latest bzr from base_report_unicode.
In the post above i got an error with the mac client, and we don't trust them so i installed the open erp client 5.0.3 on the server and we did it again.
Now we get the following error with the installed modul ...

Code:
bzr: ERROR: Not a branch: "/root/".
ERROR:common.message:Message decoding Unicode is not supported:
Environment Information :
System : Linux-2.6.18-164.el5xen-x86_64-with-redhat-5.3-Final
OS Name : posix
LSB Version:   :core-3.1-amd64:core-3.1-ia32:core-3.1-noarch:graphics-3.1-amd64:graphics-3.1-ia32:graphics-3.1-noarch
Distributor ID:   CentOS
Description:   CentOS release 5.3 (Final)
Release:   5.3
Codename:   Final
Operating System Release : 2.6.18-164.el5xen
Operating System Version : #1 SMP Thu Sep 3 04:03:03 EDT 2009
Operating System Architecture : 64bit
Operating System Locale : de_DE.utf
Python Version : 2.4.3
OpenERP-Client Version : 5.0.3
Last revision No. & ID :Bazaar Package not Found !Traceback (most recent call last):
  File "/usr/lib/python2.4/site-packages/openerp-server2/openerp-server/service/web_services.py", line 600, in go
    (result, format) = obj.create(cr, uid, ids, datas, context)
  File "/usr/lib/python2.4/site-packages/openerp-server2/openerp-server/report/printscreen/ps_list.py", line 74, in create
    fields_order = self._parse_string(result['arch'])
  File "/usr/lib/python2.4/site-packages/openerp-server2/openerp-server/report/printscreen/ps_list.py", line 54, in _parse_string
    dom = minidom.parseString(unicode(view, 'utf-8').encode('utf-8'))
TypeError: decoding Unicode is not supported


(openerp-client.py:2933): libglade-WARNING **: unknown property `has_tooltip' for class `GtkLinkButton'
Traceback (most recent call last):
  File "/root/openerp-client-5.0.3/bin/modules/gui/main.py", line 1299, in _sig_child_call
    res = wid.handlers[button_name]()
  File "/root/openerp-client-5.0.3/bin/modules/gui/window/form.py", line 384, in sig_print
    self.sig_action('client_print_multi', adds={_('Print Screen').encode('utf8'): {'report_name':'printscreen.list', 'name':_('Print Screen'), 'type':'ir.actions.report.xml'}})
  File "/root/openerp-client-5.0.3/bin/modules/gui/window/form.py", line 370, in sig_action
    res = obj.exec_keyword(keyword, {'model':self.screen.resource, 'id': id or False, 'ids':ids, 'report_type': report_type}, adds, self.screen.context)
  File "/root/openerp-client-5.0.3/bin/modules/action/main.py", line 180, in exec_keyword
    self._exec_action(action, data, context=context)
  File "/root/openerp-client-5.0.3/bin/modules/action/main.py", line 155, in _exec_action
    self.exec_report(action['report_name'], datas, context)
  File "/root/openerp-client-5.0.3/bin/modules/action/main.py", line 55, in exec_report
    val = rpc.session.rpc_exec_auth('/report', 'report_get', report_id)
  File "/root/openerp-client-5.0.3/bin/rpc.py", line 169, in rpc_exec_auth
    return sock.exec_auth(method, *args)
  File "/root/openerp-client-5.0.3/bin/rpc.py", line 112, in exec_auth
    res = self.execute(method, self._uid, self._passwd, *args)
  File "/root/openerp-client-5.0.3/bin/rpc.py", line 118, in execute
    res = self._sock.myreceive()
  File "/root/openerp-client-5.0.3/bin/tiny_socket.py", line 81, in myreceive
    raise Myexception(str(res[0]), str(res[1]))
tiny_socket.Myexception: ('decoding Unicode is not supported', 'Traceback (most recent call last):\n  File "/usr/lib/python2.4/site-packages/openerp-server2/openerp-server/service/web_services.py", line 600, in go\n    (result, format) = obj.create(cr, uid, ids, datas, context)\n  File "/usr/lib/python2.4/site-packages/openerp-server2/openerp-server/report/printscreen/ps_list.py", line 74, in create\n    fields_order = self._parse_string(result[\'arch\'])\n  File "/usr/lib/python2.4/site-packages/openerp-server2/openerp-server/report/printscreen/ps_list.py", line 54, in _parse_string\n    dom = minidom.parseString(unicode(view, \'utf-8\').encode(\'utf-8\'))\nTypeError: decoding Unicode is not supported\n')


Hopeful jada


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 08, 2010 5:58 pm 
Offline

Joined: Sat Feb 20, 2010 6:00 am
Posts: 11
I think I may be able to help. I've just managed to solve what looks like the same problem.

It looks like you are using python2.4 on Centos5.3. This was exactly the same as me and I couldn't get a lot of the default reports to print. It turns out openerp will only work properly on python2.5.

I installed a parallel instance of python2.5, rebuilt all of the required modules with version 2.5 and changed the openerp-server in /usr/bin to point to the new python and it worked.

Now I can print all reports without a problem.

If this sound like your problem, give it a try.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 01, 2010 1:52 pm 
Offline

Joined: Thu May 13, 2010 10:55 pm
Posts: 9
Quote:
Quote:
Hi,

thx for your help.

What i've done is:

Download the new 2 files from

http://bazaar.launchpad.net/~openerp-co ... t_unicode/

Overwrite these files at the "addons" folder and restart the server.

But I can't print my view! The error is:

Code:
File "service\web_services.pyo", line 687, in go
  File "report\printscreen\ps_list.pyo", line 74, in create
  File "report\printscreen\ps_list.pyo", line 54, in _parse_string
  File "lxml.etree.pyx", line 2416, in lxml.etree.XML (src/lxml/lxml.etree.c:23987)
  File "parser.pxi", line 1502, in lxml.etree._parseMemoryDocument (src/lxml/lxml.etree.c:64083)
ValueError: Unicode strings with encoding declaration are not supported.


MAC shows the following error:
Code:
Traceback (most recent call last):
  File "service\web_services.pyo", line 687, in go
  File "report\printscreen\ps_list.pyo", line 85, in create
  File "report\printscreen\ps_list.pyo", line 242, in _create_table
  File "report\render\render.pyo", line 50, in render
  File "report\render\rml.pyo", line 41, in _render
  File "report\render\rml2pdf\trml2pdf.pyo", line 780, in parseNode
  File "report\render\rml2pdf\trml2pdf.pyo", line 195, in render
  File "report\render\rml2pdf\trml2pdf.pyo", line 774, in render
  File "reportlab\platypus\doctemplate.pyo", line 756, in build
  File "reportlab\platypus\doctemplate.pyo", line 678, in handle_flowable
LayoutError: Flowable <Paragraph>Report too large on page 2


Did I forget something?

Thx again.

regards
philipp


1. Download entire directory base_report_unicode. I prefer using bzr tool.
2. Copy this directory into server/bin/addons
3. Go to Administration/Modules/Refresh
4. Select base_report_unicode in list of modules
5. Press "Install" button


To igudym,
I've done exactly like you say (after an uninstall), but I get the following error messages:
Environment Information :
System : Windows-32bit
OS Name : nt
Operating System Release :
Operating System Version : 32bit
Operating System Architecture : 32bit
Operating System Locale : nl_BE.cp1252
Python Version : 2.5.2
OpenERP-Client Version : 5.0.11
Last revision No. & ID :Bazaar Package not Found !Traceback (most recent call last):
File "service\web_services.pyo", line 683, in go
File "report\report_sxw.pyo", line 364, in create
File "report\report_sxw.pyo", line 426, in create_source_pdf
File "report\report_sxw.pyo", line 447, in create_single_pdf
File "report\interface.pyo", line 183, in create_pdf
File "report\render\render.pyo", line 50, in render
File "report\render\rml.pyo", line 41, in _render
File "report\render\rml2pdf\trml2pdf.pyo", line 790, in parseNode
File "report\render\rml2pdf\trml2pdf.pyo", line 204, in render
File "report\render\rml2pdf\trml2pdf.pyo", line 784, in render
File "reportlab\platypus\doctemplate.pyo", line 753, in build
File "reportlab\platypus\doctemplate.pyo", line 398, in clean_hanging
File "reportlab\platypus\doctemplate.pyo", line 643, in handle_flowable
File "reportlab\platypus\doctemplate.pyo", line 114, in apply
File "reportlab\platypus\doctemplate.pyo", line 423, in handle_pageBegin
File "report\render\rml2pdf\trml2pdf.pyo", line 447, in render
File "report\render\rml2pdf\trml2pdf.pyo", line 432, in render
File "report\render\rml2pdf\trml2pdf.pyo", line 421, in <lambda>
File "reportlab\pdfgen\canvas.pyo", line 1306, in setFont
File "reportlab\pdfbase\pdfmetrics.pyo", line 659, in findFontAndRegister
File "reportlab\pdfbase\pdfmetrics.pyo", line 618, in getTypeFace
KeyError: 'DejaVuSans-Bold'

Any suggestion to solve this ?

Many thanks,
Koen


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 01, 2010 2:03 pm 
Offline

Joined: Fri Nov 21, 2008 9:56 am
Posts: 3061
Location: Lotharingie
try this :
http://doc.openerp.com/developer/3_11_r ... ports.html


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 01, 2010 2:50 pm 
Offline

Joined: Thu May 13, 2010 10:55 pm
Posts: 9
Quote:


Thanks GEM,
I'll try this and let you know.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ] 

All times are UTC + 2 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:

Protected by Anti-Spam ACP