Skip to content

Conversation

@vikba
Copy link

@vikba vikba commented Sep 5, 2025

Description

When adding a custom model in the GUI with "Add custom torch model to GUI" option, it returns an error

Error message

File "/home/jd/omnipose/src/cellpose_omni/gui/MainWindowModules/models.py", line 75, in get_model_path
self.current_model_path = os.fspath(models.MODEL_DIR.joinpath(self.current_model))
NameError: name 'os' is not defined

Root cause

import os is absent but called in models.py

Solution

add missing import os to models.py

Impact

That error affects users who would like to load custom models

###Reproduction
Click "Add custom torch model to GUI" option and choose a file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant