adamspierer / FreeClimber

FreeClimber is a background-subtracting particle detection platform designed to quantify group climbing performance in a Drosophila negative geotaxis (climbing) assay
MIT License
16 stars 5 forks source link

Error using the command line #7

Open mtyrlik opened 1 year ago

mtyrlik commented 1 year ago

I get an error when I try to use the batch utility with a config file I generated using the GUI. My .MOV files are in a sub-folder called videosA. The program throws an error on the first file. There is a new folder created in the main directory called "videosAlog" instead of "log" subfolder created in the main "videosA" folder. When I physically create this subfolder and move the logs, I am able to execute the code normally, so I suppose it must be a typo (missing "/" perhaps?) in the script that initiates the analysis.

Console log below:


########################################################################
## FreeClimber v.0.4.0 #################################################
## Please cite: https://doi.org/10.1242/jeb.229377######################
## Beginning program @ 2023-09-14 11:01:58 #############################
########################################################################
Creating completed .log file:  ./videosAlog/completed.log
Creating skipped .log file:  ./videosAlog/skipped.log
========================================================================
== [1 || 46] 10_1.MOV ==================================================
========================================================================

-- [ Step 1  ] Cleaning and format image stack
-- [ Step 2  ] Identifying spots
-- [ Step 3  ] Visualize spot metrics :: False
-- [ Step 4a ]   - Setting spot threshold
-- [ Step 4b ]   - Filtering by signal threshold
-- [ Step 4c ]   - Filtering by eccentricity/circularity
-- [ Step 4d ]   - Trimming outliers (if indicated)
-- [ Step 4e ]   - Assigning spots to vials
-- [ Step 4f ]   - Saving raw data file
Appending to log/skipped.log:  ./videosA\10_1.MOV
Traceback (most recent call last):
  File "./scripts/FreeClimber_main.py", line 475, in main
    fc.process(video_file = File,variables = None, config_file = fc.config_file)
  File "./scripts/FreeClimber_main.py", line 196, in process
    d.step_4()# Filters and processes data detected points
  File "D:\freeclimber\FreeClimber\scripts\detector.py", line 1050, in step_4
    self.df_big.to_csv(self.path_data, index=None)
  File "D:\Anaconda\envs\python36\lib\site-packages\pandas\core\generic.py", line 3204, in to_csv
    formatter.save()
  File "D:\Anaconda\envs\python36\lib\site-packages\pandas\io\formats\csvs.py", line 188, in save
    compression=dict(self.compression_args, method=self.compression),
  File "D:\Anaconda\envs\python36\lib\site-packages\pandas\io\common.py", line 428, in get_handle
    f = open(path_or_buf, mode, encoding=encoding, newline="")
OSError: [Errno 22] Invalid argument: './videosA\x08_1.raw.csv'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "./scripts/FreeClimber_main.py", line 489, in <module>
    main()
  File "./scripts/FreeClimber_main.py", line 479, in main
    fc.log_video(completed=False, file_name = File)
  File "./scripts/FreeClimber_main.py", line 281, in log_video
    with open(self.path_project + '/' + path,'a') as f:
FileNotFoundError: [Errno 2] No such file or directory: './videosA/log/skipped.log'
adamspierer commented 1 year ago

Hi @mtyrlik,

My guess is that the program may not be able to find the video because it "thinks" that the \ is another character instead of a /.

Can you check the command you use to call the script, the configuration file, and filenames for any \? Replace any with / and re-run, then let me know if it works.