Odoo Help


This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


[SOLVED] How to solve ascii 4,00 Stuk(s 4 5 ordinal not in range(128)

Michael Bos
on 9/1/14, 10:10 AM 1,621 views

I upgraded Ubuntu 12.04 to 14.04 LTS and after having some problems not being able te print, which were solved with help from this community. I now have the problem I cannot print sales orders which have been created before the upgrade (also upgraded OpenERP).

But the new ones are printable. Error msg is :

4,00 Stuk(s
ordinal not in range(128)

(<type 'exceptions.UnicodeEncodeError'>, UnicodeEncodeError('ascii', u'4,00\xa0Stuk(s', 4, 5, 'ordinal not in range(128)'), <traceback object at 0x7fbea533a7a0>)

Log file says :

Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.7/openerp/netsvc.py", line 296, in dispatch_rpc
    result = ExportService.getService(service_name).dispatch(method, params)
  File "/usr/lib/pymodules/python2.7/openerp/service/web_services.py", line 654, in dispatch
    res = fn(db, uid, *params)
  File "/usr/lib/pymodules/python2.7/openerp/service/web_services.py", line 760, in exp_report_get
    return self._check_report(report_id)
  File "/usr/lib/pymodules/python2.7/openerp/service/web_services.py", line 738, in _check_report
    netsvc.abort_response(exc, exc.message, 'warning', exc.traceback)
  File "/usr/lib/pymodules/python2.7/openerp/netsvc.py", line 71, in abort_response
    raise openerp.osv.osv.except_osv(description, details)
except_osv: (u'ascii\n4,00\xa0Stuk(s\n4\n5\nordinal not in range(128)', (<type 'exceptions.UnicodeEncodeError'>, UnicodeEncodeError('ascii', u'4,00\xa0Stuk(s', 4, 5, 'ordinal not in range(128)'), <traceback object at 0x7fbea533a7a0>))

Hope this rings a bell for someone. Looking at this I would says it is complaining about the number of items and the uom used for that.

Please post your code where you are creating that string

GH Mediacloud, Grover Menacho
on 9/1/14, 11:51 AM

Dear Grover, I have no code regarding that string. It is in standard OpenERP. After the upgrade this has started on all old orders.

Mibo, Michael Bos
on 9/2/14, 3:58 AM
Michael Bos
On 9/2/14, 4:00 AM

I have solved this problem. I was checking my database and suddenly saw that there was no instance of our widely used "Stuk(s)" (pieces in Dutch) as UOM. The problem existed because somehow in the upgrade Ubuntu did to Postgres this entry in the table was lost. I recreated this UOM and now everything works fine again.

Thanks Grover for taking some time to look into it.

Problem Solved!


EDIT!!!: As it turns out this was only a partial answer. It works now on most reports, but not on all of the reports. This is somewhat strange. It keeps saying this on the standard order forms from OpenERP. So If somebody know more about this, please share this with me.

EDIT 2 : Now I solved it by removing the UOM on the report and then readding it. This solved my problem.

I opened the report in Openoffice, removed the UOM under Quantity. Saved and uploaded the report.

Readded UOM under Quantity and saved and uploaded the report again and it works!

Hope it helps someone.

This could be due to translation issues. The default OpenERP reports will look for a generated UoM from the default data (when you first install a module). This is most likely "Unit(s)", using the "Stuks" translation for the dutch translation. Check the translated terms to see if you properly translated the new record. Another option would most likely be to update the database using flag "-u all" in order to let OpenERP re-create the record for the missing UoM, as well as reloading the Dutch translation to replace the missing translation.

Ludo - Neobis
on 9/2/14, 4:51 AM

Ludo, just for the hell of it I will try that too, it never does any harm :)

Mibo, Michael Bos
on 9/2/14, 5:05 AM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

2 follower(s)


Asked: 9/1/14, 10:10 AM
Seen: 1621 times
Last updated: 3/16/15, 8:10 AM