diff -r c3b070373492 -r b83dd2d57e43 src/eric7/EricCore/EricFileSystemWatcher.py --- a/src/eric7/EricCore/EricFileSystemWatcher.py Mon Oct 21 11:40:11 2024 +0200 +++ b/src/eric7/EricCore/EricFileSystemWatcher.py Mon Oct 21 11:49:13 2024 +0200 @@ -254,7 +254,7 @@ @return flag indicating a successful creation of a watch for the given path @rtype bool """ - if os.path.exists(path): + if os.path.exists(path) and self.__observer is not None: try: self.__paths[path][1] += 1 return True @@ -315,7 +315,8 @@ self.__paths[path][1] -= 1 if self.__paths[path][1] == 0: watch, _ = self.__paths.pop(path) - self.__observer.unschedule(watch) + if self.__observer is not None: + self.__observer.unschedule(watch) return True except KeyError: return False