{"record":{"id":"73365401a124cc46","repo":"HKUDS/DeepTutor","slug":"learningconflicterror-path-id-int-progress-versio","errorCode":null,"errorMessage":"LearningConflictError(path_id, int(progress.version), 0)","messagePattern":"LearningConflictError\\(path_id, int\\(progress\\.version\\), 0\\)","errorType":"error_code","errorClass":"LearningConflictError","httpStatus":null,"severity":"error","filePath":"deeptutor/learning/storage.py","lineNumber":472,"sourceCode":"            row = conn.execute(\n                \"SELECT * FROM mastery_paths WHERE path_id = ?\", (path_id,)\n            ).fetchone()\n        return self._progress_from_row(row) if row is not None else None\n\n    def save(self, progress: LearningProgress) -> None:\n        path_id = self._validate_id(progress.book_id)\n        self._import_legacy_if_needed(path_id)\n        now = time.time()\n        with self._connect() as conn:\n            conn.execute(\"BEGIN IMMEDIATE\")\n            try:\n                row = conn.execute(\n                    \"SELECT revision, created_at FROM mastery_paths WHERE path_id = ?\",\n                    (path_id,),\n                ).fetchone()\n                if row is None:\n                    if int(progress.version) != 0:\n                        raise LearningConflictError(path_id, int(progress.version), 0)\n                    revision = 1\n                    conn.execute(\n                        \"\"\"\n                        INSERT INTO mastery_paths (\n                            path_id, state_json, revision, created_at, updated_at\n                        ) VALUES (?, ?, ?, ?, ?)\n                        \"\"\",\n                        (\n                            path_id,\n                            self._progress_payload(progress, revision, now),\n                            revision,\n                            progress.created_at,\n                            now,\n                        ),\n                    )\n                    event_type = \"path.created\"\n                else:\n                    actual = int(row[\"revision\"])","sourceCodeStart":454,"sourceCodeEnd":490,"githubUrl":"https://github.com/HKUDS/DeepTutor/blob/3e82f130422a813cdd73c10b21a44e9325f5821a/deeptutor/learning/storage.py#L454-L490","documentation":"Error \"LearningConflictError(path_id, int(progress.version), 0)\" thrown in HKUDS/DeepTutor.","triggerScenarios":"Thrown at deeptutor/learning/storage.py:472 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"}