Odoo Help

Welcome!

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.

0

[SOLVED] How do I solve this problem : cannot concatenate 'str' and 'int' objects?

By
Michael Bos
on 9/1/14, 2:49 AM 4,432 views

When upgrading from Ubuntu 12.04 to 14.04 I had a strange failure. I have done 4 OpenERP servers and the last one gave me this error.

It occurs when trying to print anything sales or purchase related. Product labels can be printed.

This is the message it shows:

cannot concatenate 'str' and 'int' objects
handle_pageBegin args=()
 

I have made a backup of my database and tried removing all fields I create myself. I also removed all changes to views I made. When googling for this problem, it only gave me python related errors.

EDIT: I also tried installing werkzeug 0.8.3 version, but that made no difference. On my other server this worked like a charm.

 

This is what openerp log shows.

2014-09-01 06:19:04,070 14588 ERROR TMC-2 openerp.netsvc: cannot concatenate 'str' and 'int' objects
handle_pageBegin args=()
(<type 'exceptions.TypeError'>, TypeError("cannot concatenate 'str' and 'int' objects\nhandle_pageBegin args=()",), <traceback object at 0x7f3c5dbbcb48>)
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)

Is anybody getting anywhere with this? I can't seem to solve it as my python knowledge is not up to par. I am really getting frustrated as we can't use the openERP atm and we I don't know how to solve this. I tried numerous things already. Including database duplication, installed the database on another server. Installed and uninstalled modules and python programs/libraries and I am running out of ideas now.... Any help is welcome.

Mibo, Michael Bos
on 9/1/14, 7:09 AM

Tried it again while uninstalling all non standard modules, no succes. Pulling hairs atm!

Mibo, Michael Bos
on 9/1/14, 8:11 AM
1

Ben Bernard

--Ben Bernard--
1083
| 4 3 6
Jakarta, Indonesia
--Ben Bernard--
Ben Bernard
On 9/1/14, 8:57 AM

Try to upgrade repotlab and pil python module. You can test if my guess is correct by removing any image from the faulty report (including from header or footer) and then print it.

This is 100% right. I added a custom picture for our delivery terms and that one was being a thorn in my eye. Only upgrading reportlab didn't solve it. Pil module wasn't found.

Mibo, Michael Bos
on 9/1/14, 9:34 AM

Hope you can help me with this, I now disabled the logo, but I would like to get it back :)

Mibo, Michael Bos
on 9/1/14, 9:55 AM

If no pil then it should be pillow. I see some limitations of report implementation in odoo, usually because some bugs in third party module. If you hit any problem with the image, it's better to post new question.

Ben Bernard
on 9/1/14, 11:00 AM

Thanks for clearing this. It works now. I am working on the image, if I can't get it to work you will see another question ;-). Thanks for answering!

Mibo, Michael Bos
on 9/1/14, 11:26 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

1 follower(s)

Stats

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