diff --git a/pylib/anki/_backend/__init__.py b/pylib/anki/_backend/__init__.py index dc443c853..49c6af7c6 100644 --- a/pylib/anki/_backend/__init__.py +++ b/pylib/anki/_backend/__init__.py @@ -97,7 +97,7 @@ class RustBackend(RustBackendGenerated): try: return from_json_bytes(self._backend.db_command(bytes_input)) except Exception as error: - err_bytes = error.args[0] + err_bytes = bytes(error.args[0]) err = backend_pb2.BackendError() err.ParseFromString(err_bytes) raise backend_exception_to_pylib(err)