diff --git a/genshin/client/manager/managers.py b/genshin/client/manager/managers.py index 450b21a4..fceb4ca5 100644 --- a/genshin/client/manager/managers.py +++ b/genshin/client/manager/managers.py @@ -249,6 +249,9 @@ def user_id(self) -> typing.Optional[int]: """ for name, value in self.cookies.items(): if name in ("ltuid", "account_id", "ltuid_v2", "account_id_v2"): + if not value: + raise ValueError(f"{name} can not be an empty string.") + return int(value) return None