This question has been flagged
1 Reply
12375 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)

Avatar
Discard
Author

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.

Author

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

Best Answer

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.

Avatar
Discard
Author

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.

Author

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

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.

Author

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!