diff --git a/setup.cfg b/setup.cfg index 98d1409..d95117d 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = napari-chatgpt -version = v2024.3.13.3 +version = v2024.3.26 description = A napari plugin to process and analyse images with chatGPT. long_description = file: README.md long_description_content_type = text/markdown diff --git a/src/napari_chatgpt/chat_server/chat_server.py b/src/napari_chatgpt/chat_server/chat_server.py index 9e6840c..4fb7d7d 100644 --- a/src/napari_chatgpt/chat_server/chat_server.py +++ b/src/napari_chatgpt/chat_server/chat_server.py @@ -300,7 +300,8 @@ def start_chat_server(viewer: napari.Viewer = None, bridge = NapariBridge(viewer=viewer) # Register snapshot function: - notebook.register_snapshot_function(bridge.take_snapshot) + if notebook: + notebook.register_snapshot_function(bridge.take_snapshot) # Instantiates server: chat_server = NapariChatServer(notebook=notebook,