← Back to team overview

openerp-community-reviewer team mailing list archive

Re: lp:~ocb/ocb-web/ocb-web-7.0_lp1193563_typeerror-expected_bytes into lp:ocb-web

 

But problem still exists on upstream branch (revno 4033):

2013-12-14 09:22:18,791 27713 ERROR oe_openerp_standard70 openerp.addons.web.http.HttpRequest.dispatch: An error occurred while handling a json request
Traceback (most recent call last):
  File "/home/openeyedev/var/projects/oe_openerp_standard70/web/addons/web/http.py", line 285, in dispatch
    r = method(self, **self.params)
  File "/home/openeyedev/var/projects/oe_openerp_standard70/web/addons/web/controllers/main.py", line 1770, in index
    cookies={'fileToken': int(token)})
  File "/home/openeyedev/var/projects/oe_openerp_standard70/web/addons/web/http.py", line 332, in make_response
    response.set_cookie(k, v)
  File "/usr/lib/python2.7/dist-packages/werkzeug/wrappers.py", line 992, in set_cookie
    self.charset))
  File "/usr/lib/python2.7/dist-packages/werkzeug/http.py", line 905, in dump_cookie
    value = to_bytes(value, charset)
  File "/usr/lib/python2.7/dist-packages/werkzeug/_compat.py", line 106, in to_bytes
    raise TypeError('Expected bytes')
TypeError: Expected bytes

And that is because file web/addons/web/controllers/main.py still contains the fatal int() call:

1765         return req.make_response(report,                                       
1766              headers=[                                                         
1767                  ('Content-Disposition', content_disposition(file_name, req)), 
1768                  ('Content-Type', report_mimetype),                            
1769                  ('Content-Length', len(report))],                             
1770              cookies={'fileToken': int(token)})

Had OpenERP just accepted my merge proposal, the problem would have been solved log ago. Likt is has been solved long ago on the community branch.


-- 
https://code.launchpad.net/~ocb/ocb-web/ocb-web-7.0_lp1193563_typeerror-expected_bytes/+merge/173801
Your team OpenERP Community Backports Team is subscribed to branch lp:ocb-web.