This happens when a DVD is not inserted and I want Watchdog to wait until a DVD is inserted then run my main function.
This is the complete traceback error:
This is the complete traceback error:
Error:Traceback (most recent call last):
File "C:/Users/Daren/Documents/01 PYTHON/DVD Auto Ripper/watcher.py", line 16, in <module>
observer.start()
File "C:\Users\Daren\Documents\01 PYTHON\DVD Auto Ripper\venv\lib\site-packages\watchdog\observers\api.py", line 256, in start
emitter.start()
File "C:\Users\Daren\Documents\01 PYTHON\DVD Auto Ripper\venv\lib\site-packages\watchdog\utils\__init__.py", line 93, in start
self.on_thread_start()
File "C:\Users\Daren\Documents\01 PYTHON\DVD Auto Ripper\venv\lib\site-packages\watchdog\observers\read_directory_changes.py", line 67, in on_thread_start
self._handle = get_directory_handle(self.watch.path)
File "C:\Users\Daren\Documents\01 PYTHON\DVD Auto Ripper\venv\lib\site-packages\watchdog\observers\winapi.py", line 316, in get_directory_handle
return CreateFileW(path, FILE_LIST_DIRECTORY, WATCHDOG_FILE_SHARE_FLAGS,
File "C:\Users\Daren\Documents\01 PYTHON\DVD Auto Ripper\venv\lib\site-packages\watchdog\observers\winapi.py", line 112, in _errcheck_handle
raise ctypes.WinError()
PermissionError: [WinError 21] The device is not ready.