Repository navigation
Start from any folder: load the webcam and optimizer .ui files from the package - #119
Merged
nvladimus merged 1 commit intoOct 9, 2026
Conversation
…es from the package WebcamWindow and mesoSPIM_Optimizer loaded their .ui files relative to the working folder, so `python mesoSPIM/mesoSPIM_Control.py -D` from the repository root (as AGENTS.md says) stopped at startup with FileNotFoundError: 'gui/WebcamWindow.ui'; the webcam window opens at every startup. The optimizer failed the same way when opened. Both now find the gui folder from their own file, as the main window does through package_directory, so WebcamWindow still works stand-alone. Checked in demo mode from the repository root: mesoSPIM starts and runs, and the demo ETL file loads. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J2m2maCdWtVBtqdqaQi5xV
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Starting mesoSPIM from the repository root, as AGENTS.md describes (
python mesoSPIM/mesoSPIM_Control.py -D), stops during startup:The webcam window opens at every startup (since 61f2379), and it loads its
.uifile relative to the working folder.mesoSPIM_Optimizerdoes the same for its two.uifiles, so it fails the same way when it is opened. Started frommesoSPIM/, both work. That probably also applies to themesospim-controlconsole script when it's run from another folder.Change
WebcamWindowandmesoSPIM_Optimizernow find theguifolder from their own file, as the main window does throughpackage_directory.WebcamWindowis built without a parent, so it still works stand-alone. One commit, two files.Two other
loadUicalls with relative paths are left alone.mesoSPIM_CameraWindow.py:69andmesoSPIM_TileViewWindow.py:32only use them when the module is run as__main__; inside the app they load frompackage_directory.Tests
In demo mode, started from the repository root, mesoSPIM starts and is still running after 60 s, and the demo ETL file loads. Before this change it stopped with the error above. The optimizer window has not been opened by hand yet.
🤖 Generated with Claude Code
https://claude.ai/code/session_01J2m2maCdWtVBtqdqaQi5xV