https://bugs.launchpad.net/openerp-web/+bug/1193563
And following in the logs:
2013-06-22 07:12:50,987 24036 ERROR openerp openerp.addons.web.http.HttpRequest.dispatch: An error occurred while handling a json request
Traceback (most recent call last):
File "/usr/openerp/addons/web/http.py", line 285, in dispatch
r = method(self, **self.params)
File "/usr/openerp/addons/web/controllers/main.py", line 1767, in index
cookies={'fileToken': int(token)})
File "/usr/openerp/addons/web/http.py", line 332, in make_response
response.set_cookie(k, v)
File "/usr/lib64/python2.7/site-packages/werkzeug/wrappers.py", line 960, in set_cookie
self.charset))
File "/usr/lib64/python2.7/site-packages/werkzeug/http.py", line 905, in dump_cookie
value = to_bytes(value, charset)
File "/usr/lib64/python2.7/site-packages/werkzeug/_compat.py", line 106, in to_bytes
raise TypeError('Expected bytes')
TypeError: Expected bytes
原因可能是
werkzeug 库更新,致使oe出现bug
需对以下文件做修改
=== modified file 'addons/web/controllers/main.py' | |
2 | --- addons/web/controllers/main.py 2013-07-02 12:20:14 +0000 |
3 | +++ addons/web/controllers/main.py 2013-07-09 19:21:27 +0000 |
4 | @@ -812,7 +812,7 @@ |
5 | return req.make_response(db_dump, |
6 | [('Content-Type', 'application/octet-stream; charset=binary'), |
7 | ('Content-Disposition', content_disposition(filename, req))], |
8 | - {'fileToken': int(token)} |
9 | + {'fileToken': token} |
10 | ) |
11 | except xmlrpclib.Fault, e: |
12 | return simplejson.dumps([[],[{'error': e.faultCode, 'title': _('Backup Database')}]]) |
13 | @@ -1320,7 +1320,7 @@ |
14 | return req.make_response(filecontent, |
15 | headers=[('Content-Type', 'application/octet-stream'), |
16 | ('Content-Disposition', content_disposition(filename, req))], |
17 | - cookies={'fileToken': int(token)}) |
18 | + cookies={'fileToken': token}) |
19 | |
20 | @openerpweb.httprequest |
21 | def upload(self, req, callback, ufile): |
22 | @@ -1627,7 +1627,7 @@ |
23 | headers=[('Content-Disposition', |
24 | content_disposition(self.filename(model), req)), |
25 | ('Content-Type', self.content_type)], |
26 | - cookies={'fileToken': int(token)}) |
27 | + cookies={'fileToken': token}) |
28 | |
29 | class CSVExport(ExportFormat, http.Controller): |
30 | _cp_path = '/web/export/csv' |
31 | @@ -1767,6 +1767,6 @@ |
32 | ('Content-Disposition', content_disposition(file_name, req)), |
33 | ('Content-Type', report_mimetype), |
34 | ('Content-Length', len(report))], |
35 | - cookies={'fileToken': int(token)}) |
36 | + cookies={'fileToken': token}) |
37 | |
38 | # vim:expandtab:tabstop=4:softtabstop=4:shiftwidth=4: |