diff --git a/fastplotlib/__init__.py b/fastplotlib/__init__.py index 2f3c35a1a..9cc8d8432 100644 --- a/fastplotlib/__init__.py +++ b/fastplotlib/__init__.py @@ -24,7 +24,9 @@ __version__ = f.read().split("\n")[0] if len(enumerate_adapters()) < 1: - raise IndexError( + from warnings import warn + + warn( f"WGPU could not enumerate any adapters, fastplotlib will not work.\n" f"This is caused by one of the following:\n" f"1. You do not have a hardware GPU installed and you do not have " @@ -35,5 +37,6 @@ f"common in cloud computing environments.\n" f"These two links can help you troubleshoot:\n" f"https://wgpu-py.readthedocs.io/en/stable/start.html#platform-requirements\n" - f"https://fastplotlib.readthedocs.io/en/latest/user_guide/gpu.html\n" + f"https://fastplotlib.readthedocs.io/en/latest/user_guide/gpu.html\n", + RuntimeWarning, ) diff --git a/fastplotlib/utils/gui.py b/fastplotlib/utils/gui.py index a8a79920f..6a0d8dfdc 100644 --- a/fastplotlib/utils/gui.py +++ b/fastplotlib/utils/gui.py @@ -59,10 +59,10 @@ def _notebook_print_banner(): image = Image(value=logo_data, format="png", width=300, height=55) # get adapters and info - adapters = [a for a in wgpu.gpu.enumerate_adapters()] + adapters = [a for a in wgpu.gpu.enumerate_adapters_sync()] adapters_info = [a.info for a in adapters] - default_adapter_info = wgpu.gpu.request_adapter().info + default_adapter_info = wgpu.gpu.request_adapter_sync().info default_ix = adapters_info.index(default_adapter_info) if len(adapters) < 1: