logging: add missing close quote in logging message - #8
Merged
Conversation
Alpaca233
added a commit
that referenced
this pull request
May 26, 2026
Picks up the remaining cheap, reasonable fixes from PR #535 review: #1 cv2.imwrite return value: cv2 returns False (without raising) on missing dir, missing codec, or unsupported dtype. We now check the return value, log a throttled WARNING per failure, increment a _silent_write_failures counter (surfaced in the diagnostics summary), and skip counter increment + CSV row write so no row references a file that isn't on disk. #4 channel-name path sanitization: get_image_filepath previously only replaced spaces; now also strips '/', '\\', ':', '*', '?', '"', '<', '>', '|'. Strict improvement for both the recording widget and the multipoint pipeline. #7 frames.csv open guarded: a PermissionError on the CSV file no longer leaves the widget in a half-started state. On failure, experiment_ID is cleared and the exception is re-raised so the toggle_recording slot doesn't run streamHandler.start_recording(). #8 drop the dead image_format constructor parameter: process_queue hasn't read it since the cv2.imwrite refactor — it derives the extension from control._def.Acquisition.IMAGE_FORMAT via get_image_filepath. No in-tree callers passed it. #9 OSError auto-stop emits only once per recording: a saturated queue hitting a persistent OSError (e.g., full disk) no longer fires 10 redundant stop_recording signals. _stop_requested_from_writer is reset in start_new_experiment; subsequent errors during shutdown log as WARNING instead of re-emitting. #18 channel_provider returning None at start_new_experiment now logs a distinct WARNING. Before, a user who launched the GUI and clicked Record without first selecting a live channel got every frame tagged 'live' with no warning (because the provider lambda itself was non-None, just its return value was). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
See title. This is a debug message formatting-only change.
Tested by: Running
python main_hcs.py --simulation