Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in controllers.py #1

Open
vernichon opened this issue Feb 20, 2014 · 2 comments
Open

Bug in controllers.py #1

vernichon opened this issue Feb 20, 2014 · 2 comments

Comments

@vernichon
Copy link

This module work for pdf if in controllers.py line 177
you change

('Content-Type', self.content_type)],

by
('Content-Type', self.content_type())],

else I obtain this error

2014-02-20 11:58:49,844 22252 ERROR fiefv70 werkzeug: Error on request:
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/Werkzeug-0.9.1-py2.7.egg/werkzeug/serving.py", line 177, in run_wsgi
execute(self.server.app)
File "/usr/local/lib/python2.7/dist-packages/Werkzeug-0.9.1-py2.7.egg/werkzeug/serving.py", line 165, in execute
application_iter = app(environ, start_response)
File "/mnt/uniforme_data/openerp/7.0/server/openerp/service/wsgi_server.py", line 417, in application
return application_unproxied(environ, start_response)
File "/mnt/uniforme_data/openerp/7.0/server/openerp/service/wsgi_server.py", line 403, in application_unproxied
result = handler(environ, start_response)
File "/mnt/uniforme_data/openerp/7.0/web/addons/web/http.py", line 528, in call
return self.dispatch(environ, start_response)
File "/mnt/uniforme_data/openerp/7.0/web/addons/web/http.py", line 487, in call
return self.app(environ, start_wrapped)
File "/usr/local/lib/python2.7/dist-packages/Werkzeug-0.9.1-py2.7.egg/werkzeug/wsgi.py", line 579, in call
return self.app(environ, start_response)
File "/mnt/uniforme_data/openerp/7.0/web/addons/web/http.py", line 564, in dispatch
return response(environ, start_response)
File "/usr/local/lib/python2.7/dist-packages/Werkzeug-0.9.1-py2.7.egg/werkzeug/wrappers.py", line 1168, in call
app_iter, status, headers = self.get_wsgi_response(environ)
File "/usr/local/lib/python2.7/dist-packages/Werkzeug-0.9.1-py2.7.egg/werkzeug/wrappers.py", line 1158, in get_wsgi_response
return app_iter, self.status, headers.to_wsgi_list()
File "/usr/local/lib/python2.7/dist-packages/Werkzeug-0.9.1-py2.7.egg/werkzeug/datastructures.py", line 1185, in to_wsgi_list
return [(k, v.encode('latin1')) for k, v in self]
AttributeError: 'function' object has no attribute 'encode'

@prajul07
Copy link
Contributor

Can you please try with our latest module. We have made some changes. We where unable to reproduce the error.

@mfaheemkhan6
Copy link

I want to install this module in odoo 8.0 but facing a problem. below is the error code I am recieving when I update the module list.
Traceback (most recent call last):
File "/opt/odoo/odoo/openerp/http.py", line 476, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/opt/odoo/odoo/openerp/http.py", line 495, in dispatch
result = self._call_function(*_self.params)
File "/opt/odoo/odoo/openerp/http.py", line 311, in _call_function
return checked_call(self.db, *args, *_kwargs)
File "/opt/odoo/odoo/openerp/service/model.py", line 113, in wrapper
return f(dbname, _args, *_kwargs)
File "/opt/odoo/odoo/openerp/http.py", line 308, in checked_call
return self.endpoint(_a, *_kw)
File "/opt/odoo/odoo/openerp/http.py", line 685, in call
return self.method(_args, *_kw)
File "/opt/odoo/odoo/openerp/http.py", line 360, in response_wrap
response = f(_args, *_kw)
File "/opt/odoo/odoo/addons/web/controllers/main.py", line 945, in call_button
action = self._call_kw(model, method, args, {})
File "/opt/odoo/odoo/addons/web/controllers/main.py", line 933, in _call_kw
return getattr(request.registry.get(model), method)(request.cr, request.uid, _args, *_kwargs)
File "/opt/odoo/odoo/openerp/api.py", line 233, in wrapper
return old_api(self, _args, *_kwargs)
File "/opt/odoo/odoo/openerp/api.py", line 387, in old_api
result = new_api(recs, _args, *_kwargs)
File "/opt/odoo/odoo/openerp/api.py", line 391, in new_api
result = [method(rec, _args, *_kwargs) for rec in self]
File "/opt/odoo/odoo/openerp/addons/base/module/wizard/base_module_update.py", line 15, in update_module
self.updated, self.added = self.env['ir.module.module'].update_list()
File "/opt/odoo/odoo/openerp/api.py", line 231, in wrapper
return new_api(self, _args, *_kwargs)
File "/opt/odoo/odoo/openerp/api.py", line 460, in new_api
result = method(self._model, cr, uid, _args, *_kwargs)
File "/opt/odoo/odoo/openerp/addons/base/module/module.py", line 653, in update_list
handler.load_addons()
File "/opt/odoo/odoo/openerp/http.py", line 1186, in load_addons
m = import('openerp.addons.' + module)
File "/opt/odoo/odoo/openerp/modules/module.py", line 76, in load_module
mod = imp.load_module('openerp.addons.' + module_part, f, path, descr)
File "/opt/odoo/odoo/addons/web_printscreen_zb/init.py", line 25, in
import controllers
File "/opt/odoo/odoo/addons/web_printscreen_zb/controllers.py", line 28, in
import web.http as openerpweb
ImportError: No module named web.http

fanzalika pushed a commit to fanzalika/openerp-7-web-addons that referenced this issue Sep 12, 2016
[FIX] PEP8
[IMP] Modify header, Add footer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants