Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
4 Odpowiedzi
7110 Widoki

Hi, I have downloaded the latest code from nightly in that i am facing issues that not able to export any data nothing happens and i get this error in backend.

openerp.addons.web.http.HttpRequest.dispatch: An error occurred while handling a json request Traceback (most recent call last): File "/opt/openerp/server/openerp/addons/web/http.py", line 285, in dispatch r = method(self, **self.params) File "/opt/openerp/server/openerp/addons/web/controllers/main.py", line 1630, in index cookies={'fileToken': int(token)}) File "/opt/openerp/server/openerp/addons/web/http.py", line 332, in make_response response.set_cookie(k, v) File "/usr/local/lib/python2.7/dist-packages/werkzeug/wrappers.py", line 960, in set_cookie self.charset)) File "/usr/local/lib/python2.7/dist-packages/werkzeug/http.py", line 905, in dump_cookie value = to_bytes(value, charset) File "/usr/local/lib/python2.7/dist-packages/werkzeug/_compat.py", line 106, in to_bytes raise TypeError('Expected bytes') TypeError: Expected bytes

Awatar
Odrzuć

Can you edit your question to include all the steps you have done to end up with this error? E.g. what you were trying to export and what you clicked to export the data etc.

Similar things we facing with openerp stable 7.0 version, when backup or exporting database.

Najlepsza odpowiedź

Dude, this is because cookies are not intended to support unicode characters, you must use a decoded variable in the cookie you are trying to set. something like :

    set_cookie(k, bytes(v))

Awatar
Odrzuć
Najlepsza odpowiedź

Dear Friend,

I had same problem. but I try this code and it work fine.

First check the library of  werkzeug using below command.

pip show werkzeug | grep Version.

if you get  Version: 0.8.3 then fine other wise install werkzeug library with version 0.8.3

using below command you will install the library.

sudo pip install werkzeug==0.8.3

Hope may be helpfull. 

Thanks & Regards

Ankit H Gandhi.

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
1
lip 25
1560
3
lut 25
14745
1
kwi 25
2024
Export Import Rozwiązane
1
kwi 25
1856
0
paź 23
1314