Skip to Content
Menu
This question has been flagged
2 Replies
3367 Rodiniai

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. 

Portretas
Atmesti
Autorius Best Answer

Thank you for your response, but I have already tried these methods before. However, this error is not only limited to custom add-ons, but it is also encountered in the original add-ons of Odoo whenever it reaches UserError, ValidationError, or other exceptions.

Portretas
Atmesti
Best Answer

Hi,

You can refer to this video

link:

https://www.youtube.com/watch?v=eaP7J1oYmOo

Also, refer to this blog too

link:- 

https://www.cybrosys.com/blog/how-to-run-efficient-error-management-with-the-odoo-14-exceptions

Also try to use latest odoo 14 addons if you are using same addons for a long time.

Regards

Portretas
Atmesti
Related Posts Replies Rodiniai Veikla
1
spal. 24
1135
0
gruod. 23
1295
0
bal. 21
1864
1
birž. 20
3840
2
bal. 17
31