diff --git a/can/interfaces/vector/exceptions.py b/can/interfaces/vector/exceptions.py index 95f8b579d..739060188 100644 --- a/can/interfaces/vector/exceptions.py +++ b/can/interfaces/vector/exceptions.py @@ -6,8 +6,9 @@ class VectorError(CanError): def __init__(self, error_code, error_string, function): - self.error_code = error_code - super().__init__(f"{function} failed ({error_string})") + super().__init__( + message=f"{function} failed ({error_string})", error_code=error_code + ) # keep reference to args for pickling self._args = error_code, error_string, function diff --git a/test/test_vector.py b/test/test_vector.py index 69edd6d38..09ad7c9c3 100644 --- a/test/test_vector.py +++ b/test/test_vector.py @@ -284,7 +284,6 @@ def test_called_without_testing_argument(self) -> None: # do not set the _testing argument, since it suppresses the exception can.Bus(channel=0, bustype="vector") - @unittest.skip("Fixing this is deferred until Vector is adjusted after #1025") def test_vector_error_pickle(self) -> None: error_code = 118 error_string = "XL_ERROR"