Ir al contenido
Menú
Se marcó esta pregunta
2 Respuestas
4037 Vistas

Hi,

I've been learning Odoo in my local Community edition installation. I had stable version in Git but when I tried to start Odoo it gave internal server error. When I checked the Odoo logs I was given the following error:


2023-08-28 11:29:56,315 7800 WARNING localhost_db py.warnings: E:\odoo16\server\odoo\http.py:1459: DeprecationWarning: 'werkzeug.urls.url_parse' is deprecated and will be removed in Werkzeug 3.0. Use 'urllib.parse.urlsplit' instead.

File "E:\miniconda3\lib\threading.py", line 973, in _bootstrap

self._bootstrap_inner()

File "E:\miniconda3\lib\threading.py", line 1016, in _bootstrap_inner

self.run()

File "E:\miniconda3\lib\threading.py", line 953, in run

self._target(*self._args, **self._kwargs)

File "E:\miniconda3\lib\socketserver.py", line 683, in process_request_thread

self.finish_request(request, client_address)

File "E:\miniconda3\lib\socketserver.py", line 360, in finish_request

self.RequestHandlerClass(request, client_address, self)

File "E:\miniconda3\lib\socketserver.py", line 747, in __init__

self.handle()

File "E:\miniconda3\lib\site-packages\werkzeug\serving.py", line 392, in handle

super().handle()

File "E:\miniconda3\lib\http\server.py", line 433, in handle

self.handle_one_request()

File "E:\miniconda3\lib\http\server.py", line 421, in handle_one_request

method()

File "E:\miniconda3\lib\site-packages\werkzeug\serving.py", line 364, in run_wsgi

execute(self.server.app)

File "E:\miniconda3\lib\site-packages\werkzeug\serving.py", line 325, in execute

application_iter = app(environ, start_response)

File "E:\odoo16\server\odoo\http.py", line 1998, in __call__

response = request._serve_db()

File "E:\odoo16\server\odoo\http.py", line 1584, in _serve_db

return service_model.retrying(self._serve_ir_http, self.env)

File "E:\odoo16\server\odoo\service\model.py", line 133, in retrying

result = func()

File "E:\odoo16\server\odoo\http.py", line 1611, in _serve_ir_http

response = self.dispatcher.dispatch(rule.endpoint, args)

File "E:\odoo16\server\odoo\http.py", line 1725, in dispatch

return self.request.registry['ir.http']._dispatch(endpoint)

File "E:\odoo16\server\odoo\addons\base\models\ir_http.py", line 154, in _dispatch

result = endpoint(**request.params)

File "E:\odoo16\server\odoo\http.py", line 697, in route_wrapper

result = endpoint(self, *args, **params_ok)

File "E:\odoo16\server\odoo\addons\portal\controllers\web.py", line 16, in index

return super().index(*args, **kw)

File "E:\odoo16\server\odoo\http.py", line 697, in route_wrapper

result = endpoint(self, *args, **params_ok)

File "E:\odoo16\server\odoo\addons\web\controllers\home.py", line 34, in index

return request.redirect_query('/web', query=request.params)

File "E:\odoo16\server\odoo\http.py", line 1467, in redirect_query

return self.redirect(location, code=code, local=local)

File "E:\odoo16\server\odoo\http.py", line 1459, in redirect

location = '/' + url_parse(location).replace(scheme='', netloc='').to_url().lstrip('/')


...Other errors like the one above...


2023-08-28 11:30:24,219 7800 ERROR localhost_db odoo.http: Exception during request handling. 

Traceback (most recent call last):

File "E:\odoo16\server\odoo\http.py", line 1998, in __call__

response = request._serve_db()

File "E:\odoo16\server\odoo\http.py", line 1584, in _serve_db

return service_model.retrying(self._serve_ir_http, self.env)

File "E:\odoo16\server\odoo\service\model.py", line 133, in retrying

result = func()

File "E:\odoo16\server\odoo\http.py", line 1613, in _serve_ir_http

self.registry['ir.http']._post_dispatch(response)

File "E:\odoo16\server\odoo\addons\utm\models\ir_http.py", line 26, in _post_dispatch

super()._post_dispatch(response)

File "E:\odoo16\server\odoo\addons\base\models\ir_http.py", line 161, in _post_dispatch

request.dispatcher.post_dispatch(response)

File "E:\odoo16\server\odoo\http.py", line 1681, in post_dispatch

self.request._save_session()

File "E:\odoo16\server\odoo\http.py", line 1512, in _save_session

self.future_response.set_cookie('session_id', sess.sid, max_age=SESSION_LIFETIME, httponly=True)

File "E:\odoo16\server\odoo\http.py", line 1126, in set_cookie

werkzeug.Response.set_cookie(self, key, value=value, max_age=max_age, expires=expires, path=path, domain=domain, secure=secure, httponly=httponly, samesite=samesite)

File "E:\miniconda3\lib\site-packages\werkzeug\sansio\response.py", line 258, in set_cookie

charset = self._charset if self._charset != "utf-8" else None

AttributeError: 'FutureResponse' object has no attribute '_charset'


I didn't touch dependencies and the error seemingly appeared out of nowhere. Does anyone have experience how to solve this error in Odoo?


Version: Odoo 16 Community Edition, installed locally


Best regards, Turi.

Avatar
Descartar
Autor Mejor respuesta

Fixed.

The application was bricked same date that new Python version came out so I figured that might (or might not) have something to do with it. I downloaded latest stable Python release, created new virtual environment in PyCharm using said Python version and installed requirements.txt again. After that the project works like before.

Avatar
Descartar
Mejor respuesta

Hi,
Try this commands:

sudo pip3 uninstall werkzeug

sudo pip3 install werkzeug Werkzeug==0.16.1


See: https://www.odoo.com/forum/help-1/odoo-http-exception-during-request-handling-224343

Thanks

Avatar
Descartar
Autor

Hi,
Thank you for the suggestion but unfortunately it didn't work, I am still receiving the same error. I believe the problem could be that I have to start using urllib.parse instead of werkzeug but I don't know how to replace all instances of the werkzeug and if they have the same interfaces.