When I use the ValidationError and UserError of odoo version 14 running on an ubuntu server to show the error to the user with an example statement like:
raise UserError(_('No API configuration parameter found. Please contact IT !'))
but I get the error:
2023-05-14 05:55:10,281 20270 INFO his_odoo_v2 longpolling: 192.168.11.112 - - [2023-05-14 05:55:10] "POST /longpolling/im_status HTTP/1.0" 200 1961 0.015715
2023-05-14 05:55:22,433 20270 INFO his_odoo_v2 longpolling: 192.168.11.112 - - [2023-05-14 05:55:22] "POST /longpolling/poll HTTP/1.0" 200 408 50.015951
2023-05-14 05:55:33,193 20268 INFO his_odoo_v2 werkzeug: 172.10.1.103 - - [14/May/2023 05:55:33] "POST /longpolling/im_status HTTP/1.1" 200 - 5 0.009 0.011
2023-05-14 05:55:35,287 20270 INFO his_odoo_v2 longpolling: 192.168.11.112 - - [2023-05-14 05:55:35] "POST /longpolling/im_status HTTP/1.0" 200 1961 0.019660
2023-05-14 05:55:37,276 20270 INFO his_odoo_v2 longpolling: 192.168.11.112 - - [2023-05-14 05:55:37] "POST /longpolling/im_status HTTP/1.0" 200 1961 0.015995
2023-05-14 05:55:38,175 20267 INFO his_odoo_v2 werkzeug: 172.10.1.103 - - [14/May/2023 05:55:38] "POST /longpolling/poll HTTP/1.1" 500 - 1 0.000 0.003
2023-05-14 05:55:38,176 20267 ERROR his_odoo_v2 werkzeug: Error on request:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/werkzeug/serving.py", line 306, in run_wsgi
execute(self.server.app)
File "/usr/local/lib/python3.8/dist-packages/werkzeug/serving.py", line 294, in execute
application_iter = app(environ, start_response)
File "/odoo/odoo-server/odoo/service/wsgi_server.py", line 113, in application
return application_unproxied(environ, start_response)
File "/odoo/odoo-server/odoo/service/wsgi_server.py", line 88, in application_unproxied
result = odoo.http.root(environ, start_response)
File "/odoo/odoo-server/odoo/http.py", line 1307, in __call__
return self.dispatch(environ, start_response)
File "/odoo/odoo-server/odoo/http.py", line 1273, in __call__
return self.app(environ, start_wrapped)
File "/usr/local/lib/python3.8/dist-packages/werkzeug/middleware/shared_data.py", line 220, in __call__
return self.app(environ, start_response)
File "/odoo/odoo-server/odoo/http.py", line 1502, in dispatch
return response(environ, start_response)
TypeError: 'NoneType' object is not callable - - -
I have tried, but still couldn't find the cause. I hope everyone can help me, thank you all very much.