Skip to content

Commit

Permalink
Only throw the warning in case the run_folder hasn't already appeared
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-l-kong committed Jul 31, 2023
1 parent 1c34a1d commit 3dfa886
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions src/toffy/fov_watcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -551,13 +551,14 @@ def start_watcher(
number of seconds to wait for non-zero file size
"""
# warn the user to explicitly confirm the run folder
warnings.warn(
f"Listening at D:\\\\Data\\{run_folder}. Please first double check that your run data "
"doesn't already exist under a slightly different name in D:\\\\Data. "
"Sometimes, the CACs will change capitalization or add extra characters to the run folder. "
"If this is the case, stop the watcher and update the run_name variable in the notebook "
"before trying again."
)
if not os.path.exists(run_folder):
warnings.warn(
f"Waiting for D:\\\\Data\\{run_folder}. Please first double check that your run data "
"doesn't already exist under a slightly different name in D:\\\\Data. "
"Sometimes, the CACs change capitalization or add extra characters to the run folder. "
"If this happens, stop the watcher and update the run_name variable in the notebook "
"before trying again."
)

# allow the watcher to
run_folder_wait_time = 0
Expand Down

0 comments on commit 3dfa886

Please sign in to comment.