{"record":{"id":"68eaafb71dc718bc","repo":"HKUDS/DeepTutor","slug":"linked-folder-not-found-folder-id","errorCode":null,"errorMessage":"Linked folder not found: {folder_id}","messagePattern":"Linked folder not found: (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"deeptutor/knowledge/manager.py","lineNumber":1797,"sourceCode":"        This enables automatic sync of changes from local folders that may\n        be synced with cloud services like SharePoint, Google Drive, etc.\n\n        Args:\n            kb_name: Knowledge base name\n            folder_id: Folder ID to check for changes\n\n        Returns:\n            Dict with 'new_files', 'modified_files', and 'has_changes' keys\n        \"\"\"\n        if kb_name not in self.list_knowledge_bases():\n            raise ValueError(f\"Knowledge base not found: {kb_name}\")\n\n        # Get folder info\n        folders = self.get_linked_folders(kb_name)\n        folder_info = next((f for f in folders if f[\"id\"] == folder_id), None)\n\n        if not folder_info:\n            raise ValueError(f\"Linked folder not found: {folder_id}\")\n\n        folder_path = Path(folder_info[\"path\"]).expanduser().resolve()\n        last_sync = folder_info.get(\"last_sync\")\n        synced_files = folder_info.get(\"synced_files\", {})\n\n        # Parse last sync timestamp\n        last_sync_time = None\n        if last_sync:\n            try:\n                last_sync_time = datetime.fromisoformat(last_sync)\n            except Exception:\n                pass\n\n        new_files = []\n        modified_files = []\n\n        for file_path in FileTypeRouter.collect_supported_files(folder_path, recursive=True):\n            file_str = str(file_path)","sourceCodeStart":1779,"sourceCodeEnd":1815,"githubUrl":"https://github.com/HKUDS/DeepTutor/blob/3e82f130422a813cdd73c10b21a44e9325f5821a/deeptutor/knowledge/manager.py#L1779-L1815","documentation":"Error \"Linked folder not found: {folder_id}\" thrown in HKUDS/DeepTutor.","triggerScenarios":"Thrown at deeptutor/knowledge/manager.py:1797 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"3e82f130422a813cdd73c10b21a44e9325f5821a","analyzedAt":"2026-08-27T06:57:25.364Z","schemaVersion":2},"datasetVersion":"2026-08-27T08:17:20.692Z"}