You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems the problem was that the response from the currency quotes service was not in json format as expected.
It will be enough to add exception handling for this error and save it in self.error.
ERROR: test_currency_rate_backend (tests.crm.backends.test_currency_rate_backend.TestCurrencyRateBackend)
Traceback (most recent call last):
File "/home/daniel/CRMAndromeda/CRMvenv/lib/python3.10/site-packages/requests/models.py", line 974, in json
return complexjson.loads(self.text, **kwargs)
File "/usr/lib/python3.10/json/init.py", line 346, in loads
return _default_decoder.decode(s)
File "/usr/lib/python3.10/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python3.10/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.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/daniel/CRMAndromeda/CRMAndromeda/tests/crm/backends/test_currency_rate_backend.py", line 20, in test_currency_rate_backend
backend = be(state_currency, MARKETING_CURRENCY, today)
File "/home/daniel/CRMAndromeda/CRMAndromeda/crm/backends/bank_gov_ua_backend.py", line 26, in init
self.data = self.get_data(marketing_currency)
File "/home/daniel/CRMAndromeda/CRMAndromeda/crm/backends/bank_gov_ua_backend.py", line 33, in get_data
return response.json()
File "/home/daniel/CRMAndromeda/CRMvenv/lib/python3.10/site-packages/requests/models.py", line 978, in json
raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
The text was updated successfully, but these errors were encountered: