Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add pint call to enforce initialization of unit registry #1146

Merged
merged 2 commits into from
Jul 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions package/PartSeg/common_backend/base_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

import napari.utils.theme
import numpy as np
import pint
from napari.qt import get_stylesheet
from napari.utils import Colormap
from napari.utils.theme import get_theme
Expand Down Expand Up @@ -471,6 +472,7 @@ def __init__(self, json_path: Union[Path, str], profile_name: str = "default"):
self.history_index = -1
self.last_executed_algorithm = ""
self._points = None
pint.get_application_registry()("nm") # enforce pint registry initialization

def _image_changed(self):
super()._image_changed()
Expand Down