Traceback (most recent call last):
File "/odoo/core/odoo/http.py", line 2329, in _serve_db
return service_model.retrying(serve_func, env=self.env)
File "/odoo/core/odoo/service/model.py", line 188, in retrying
result = func()
File "/odoo/core/odoo/http.py", line 2384, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "/odoo/core/odoo/http.py", line 2599, in dispatch
result = self.request.registry['ir.http']._dispatch(endpoint)
File "/odoo/core/odoo/addons/base/models/ir_http.py", line 353, in _dispatch
result = endpoint(**request.params)
File "/odoo/core/odoo/http.py", line 838, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "/odoo/core/addons/web/controllers/dataset.py", line 38, in call_button
action = call_kw(request.env[model], method, args, kwargs)
File "/odoo/core/odoo/service/model.py", line 97, in call_kw
result = method(recs, *args, **kwargs)
File "/odoo/core/odoo/addons/base/models/ir_module.py", line 72, in check_and_log
return method(self, *args, **kwargs)
File "/odoo/core/odoo/addons/base/models/ir_module.py", line 493, in button_immediate_install
return self._button_immediate_function(self.env.registry[self._name].button_install)
File "/odoo/core/odoo/addons/base/models/ir_module.py", line 638, in _button_immediate_function
registry = modules.registry.Registry.new(self.env.cr.dbname, update_module=True)
File "/odoo/core/odoo/tools/func.py", line 88, in locked
return func(inst, *args, **kwargs)
File "/odoo/core/odoo/orm/registry.py", line 183, in new
load_modules(...)
File "/odoo/core/odoo/modules/loading.py", line 464, in load_modules
load_module_graph(...)
File "/odoo/core/odoo/modules/loading.py", line 212, in load_module_graph
module._check()
File "/odoo/core/odoo/addons/base/models/ir_module.py", line 896, in _check
if not module.description_html:
File "/odoo/core/odoo/orm/fields.py", line 1744, in __get__
self.compute_value(recs)
File "/odoo/core/odoo/addons/base/models/ir_module.py", line 192, in _get_desc
module.description_html = _apply_description_images(doc)
File "/odoo/core/odoo/addons/base/models/ir_module.py", line 178, in _apply_description_images
html = lxml.html.document_fromstring(doc)
File "/usr/local/lib/python3.12/site-packages/lxml/html/__init__.py", line 736, in document_fromstring
value = etree.fromstring(html, parser, **kw)
ValueError: Unicode strings with encoding declaration are not supported.
Please use bytes input or XML fragments without declaration.
Module
project_timeline19.0.1.0.0Symptom
Clicking Install from the Apps UI raises immediately:
Full server-side traceback
Root cause (upstream, not in this module)
The crash is in Odoo core, not in
project_timeline. During install, Odoo rebuilds the registry, which triggers the computed fieldir.module.module.description_htmlvia_get_desc→ inner helper_apply_description_images→lxml.html.document_fromstring(doc).On Odoo 19.0 (
ir_module.py:188-192):docis a Pythonstr. It's the contents ofstatic/description/index.html, which for OCA modules generated byoca-gen-addon-readmecontains:lxml.html.document_fromstring()refusesstrinputs that self-declare their encoding — it wantsbytesso it can decode itself.Blast radius
This is not project_timeline-specific. It affects any OCA 19.0 addon whose
static/description/index.htmlwas produced byoca-gen-addon-readme. Reporting it here because project_timeline is what I was trying to install; happy to move / cross-file if there's a better home.Why OCA CI didn't catch it
The migration workflow installs modules via the server CLI, where the compute of
description_htmlmay not run (or is called in a context that swallows the error). The failure surfaces reliably only via the UIbutton_immediate_installpath, which forces the registry rebuild that in turn forces the compute.Related upstream state
odoo/odoonaming_apply_description_imagesspecifically (I searched).Possible actions
oca-gen-addon-readmeto omit the<meta http-equiv="Content-Type">line when generatingstatic/description/index.html. Would fix every OCA addon on 19.0 the next time descriptions are regenerated.odoo/odoo(happy to do that too and link back here).Reproduction
OCA/project@19.0in the addons path.Environment
e645b6a= the merge commit of [19.0][MIG] project_timeline: Migration to 19.0 #1710)Thanks to @stferraro for the 19.0 port work (PR #1710) — reporting this here so the next person who trips over it has a hit when they search.