CroatianMeteorNetwork / RMS

RPi Meteor Station
https://globalmeteornetwork.org/
GNU General Public License v3.0
169 stars 47 forks source link

EventMonitor crashes when files are in CapturedFiles #304

Closed g7gpr closed 1 week ago

g7gpr commented 1 week ago
Process EventMonitor-2:
Traceback (most recent call last):
  File "/usr/lib/python3.7/multiprocessing/process.py", line 297, in _bootstrap
    self.run()
  File "/home/pi/source/RMS/RMS/EventMonitor.py", line 2129, in run
    self.getEventsAndCheck(last_check_start_time,next_check_start_time)
  File "/home/pi/source/RMS/RMS/EventMonitor.py", line 2106, in getEventsAndCheck
    self.checkEvents(self.config, test_mode=testmode)
  File "/home/pi/source/RMS/RMS/EventMonitor.py", line 1883, in checkEvents
    file_list = self.getFileList(observed_event)
  File "/home/pi/source/RMS/RMS/EventMonitor.py", line 1569, in getFileList
    file_list += self.findEventFiles(event, self.getDirectoryList(event), [".fits", ".bin"])
  File "/home/pi/source/RMS/RMS/EventMonitor.py", line 1524, in findEventFiles
    dirlist = os.listdir(directory)
NotADirectoryError: [Errno 20] Not a directory: '/home/pi/RMS_data/CapturedFiles/AU00XX_20240703_074311_092275FF_AU00XX_20240703_110339_991_0300032_frame_0252_Even.bmp'
g7gpr commented 1 week ago

On one station the CapturedFiles directory contained not only folders, but also files which had been copied there by mistake.

g7gpr commented 1 week ago

pr #305 addresses this issue, which is caused by files, named in a similar way to an observation directory being handled as a directory.