Hello Guys,
FAIL: TestPaymentProvider.test_parsing_non_json_response_falls_back_to_text_response
Traceback (most recent call last):
File "/home/odoo/src/odoo/addons/payment/models/payment_provider.py", line 804, in _send_api_request
response.raise_for_status()
File "/usr/lib/python3/dist-packages/requests/models.py", line 1021, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 502 Server Error: None for url: None
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/requests/models.py", line 960, in json
return complexjson.loads(self.content.decode(encoding), **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/simplejson/__init__.py", line 514, in loads
return _default_decoder.decode(s)
^^^^^^^^^^^^^^^^^^^^^^^^^^
simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/odoo/src/odoo/addons/payment/tests/test_payment_provider.py", line 429, in test_parsing_non_json_response_falls_back_to_text_response
self.provider._send_api_request('GET', '/dummy')
File "/home/odoo/src/odoo/addons/payment/models/payment_provider.py", line 807, in _send_api_request
error_msg = self._parse_response_error(response)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/odoo/src/odoo/odoo/tools/misc.py", line 779, in deco
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/home/odoo/src/odoo/addons/payment/tests/test_payment_provider.py", line 432, in test_parsing_non_json_response_falls_back_to_text_response
self.assertIsInstance(e, ValidationError)
AssertionError: JSONDecodeError('Expecting value: line 1 column 1 (char 0)') is not an instance of <class 'odoo.exceptions.ValidationError'>How can I fix this error? I’m not using the accounting module in my custom module—there are no controller files and no JS-to-Python integration
NOTE: Odoo 19E+ odoo.sh
Any solution/suggestions towards this issue, I am ready to hear from you.
Thank You!