Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
4 Odpovědi
7104 Zobrazení

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

Avatar
Zrušit

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.

Nejlepší odpověď

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))

Avatar
Zrušit
Nejlepší odpověď

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.

Avatar
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
1
čvc 25
1551
3
úno 25
14712
1
dub 25
2007
Export Import Vyřešeno
1
dub 25
1842
0
říj 23
1304