ONLYOFFICE / onlyoffice_odoo

The app which enables the users to edit office documents from Odoo using ONLYOFFICE Document Server, allows multiple users to collaborate in real time and to save back those changes to Odoo
GNU Lesser General Public License v3.0
24 stars 15 forks source link

500: Internal Server Error #19

Open orzzorzz opened 1 year ago

orzzorzz commented 1 year ago

500: Internal Server Error (http://192.168.2.10:8069/onlyoffice/editor/document/5#error_traceback) Traceback (most recent call last): File "/home/odoo/odoo-src/odoo/http.py", line 1584, in _serve_db return service_model.retrying(self._serve_ir_http, self.env) File "/home/odoo/odoo-src/odoo/service/model.py", line 133, in retrying result = func() File "/home/odoo/odoo-src/odoo/http.py", line 1611, in _serve_ir_http response = self.dispatcher.dispatch(rule.endpoint, args) File "/home/odoo/odoo-src/odoo/http.py", line 1725, in dispatch return self.request.registry['ir.http']._dispatch(endpoint) File "/home/odoo/odoo-src/odoo/addons/website/models/ir_http.py", line 235, in _dispatch response = super()._dispatch(endpoint) File "/home/odoo/odoo-src/odoo/addons/base/models/ir_http.py", line 154, in _dispatch result = endpoint(*request.params) File "/home/odoo/odoo-src/odoo/http.py", line 697, in route_wrapper result = endpoint(self, args, **params_ok) File "/home/odoo/extra-addons/onlyoffice_odoo_documents/controllers/controllers.py", line 50, in render_document_editor return request.render("onlyoffice_odoo.onlyoffice_editor", self.prepare_document_editor(document_id, access_token)) File "/home/odoo/extra-addons/onlyoffice_odoo_documents/controllers/controllers.py", line 67, in prepare_document_editor return self.prepare_editor_values(attachment, access_token, True) File "/home/odoo/extra-addons/onlyoffice_odoo/controllers/controllers.py", line 126, in prepare_editor_values security_token = jwt_utils.encode_payload(request.env, { "id": request.env.user.id }, config_utils.get_internal_jwt_secret(request.env)) File "/home/odoo/extra-addons/onlyoffice_odoo/utils/jwt_utils.py", line 15, in encode_payload return jwt.encode(payload, secret, algorithm="HS256") AttributeError: module 'jwt' has no attribute 'encode'

Iskander-NSK commented 1 month ago

Присоединяюсь, т.к. причины видимо иные, но ошибка такая же. ODOO 16 Enterprise (20240602) работает через обратный прокси nginx. Сервер ODOO - Ubuntu 20.04. Onlyoffice устанавливался и тестировался с другим сервером ODOO по http.

https://192.168.1.192/onlyoffice/editor/document/5 500: Internal Server Error Traceback (most recent call last): File "/odoo/odoo-server/odoo/http.py", line 1632, in _serve_db return service_model.retrying(self._serve_ir_http, self.env) File "/odoo/odoo-server/odoo/service/model.py", line 133, in retrying result = func() File "/odoo/odoo-server/odoo/http.py", line 1659, in _serve_ir_http response = self.dispatcher.dispatch(rule.endpoint, args) File "/odoo/odoo-server/odoo/http.py", line 1773, in dispatch return self.request.registry['ir.http']._dispatch(endpoint) File "/odoo/odoo-server/addons/website/models/ir_http.py", line 237, in _dispatch response = super()._dispatch(endpoint) File "/odoo/odoo-server/odoo/addons/base/models/ir_http.py", line 154, in _dispatch result = endpoint(*request.params) File "/odoo/odoo-server/odoo/http.py", line 716, in route_wrapper result = endpoint(self, args, **params_ok) File "/odoo/custom/addons/onlyoffice_odoo_documents/controllers/controllers.py", line 50, in render_document_editor return request.render("onlyoffice_odoo.onlyoffice_editor", self.prepare_document_editor(document_id, access_token)) File "/odoo/custom/addons/onlyoffice_odoo_documents/controllers/controllers.py", line 67, in prepare_document_editor return self.prepare_editor_values(attachment, access_token, True) File "/odoo/custom/addons/onlyoffice_odoo/controllers/controllers.py", line 127, in prepare_editor_values path_part = str(data["id"]) + "?oo_security_token=" + security_token + ("&access_token=" + access_token if access_token else "") TypeError: can only concatenate str (not "bytes") to str