diff --git a/nicegui/native/native.py b/nicegui/native/native.py index 4e5b16780..a6490b813 100644 --- a/nicegui/native/native.py +++ b/nicegui/native/native.py @@ -146,6 +146,8 @@ def _send(self, *args: Any, **kwargs: Any) -> None: async def _request(self, *args: Any, **kwargs: Any) -> Any: def wrapper(*args: Any, **kwargs: Any) -> Any: try: + assert method_queue is not None + assert response_queue is not None method_queue.put((name, args, kwargs)) return response_queue.get() # wait for the method to be called and writing its result to the queue except Exception: