open-spaced-repetition / obsidian-spaced-repetition-recall

Fight the forgetting curve by reviewing flashcards & entire notes on Obsidian.md
https://www.stephenmwangi.com/obsidian-spaced-repetition/
MIT License
109 stars 7 forks source link

[Bug]: 更新了 1.12.4.6 我的复习被重置了 #58

Closed YIRU69 closed 5 months ago

YIRU69 commented 5 months ago

Describe the bug

刚刚更新了1.12.4.6,然后发现我的所有卡片都变成了新的卡片,我重新回滚到 1.12.4.4,复习了记录都在。

To Reproduce

安装新版本,打开复习窗口

Expected behavior

正确的复习记录

Screenshots

image

image

OS of your device

win10

Obsidian version

v1.6.4

Plugin version

1.12.4.6

Installer version

1.12.4.6

Additional context

No response

Config file

No response

Newdea commented 5 months ago

有些奇怪,我这边的数据都是正常的。 调试控制台窗口(ctrl+shift+i)报错信息有么

YIRU69 commented 5 months ago

没有报错,正常的

dryezl commented 5 months ago

重新载入1.12.4.4,数据还在。 如果从头开始,那就非常难受

dryezl commented 5 months ago

下面是插件的设置,即data.json

{
  "settings": {
    "responseOptionBtnsText": {
      "Default": [
        "Reset",
        "Hard",
        "Good",
        "Easy"
      ],
      "Fsrs": [
        "Reset",
        "Hard",
        "Good",
        "Easy"
      ],
      "Anki": [
        "Reset",
        "Hard",
        "Good",
        "Easy"
      ],
      "SM2": [
        "Blackout",
        "Incorrect",
        "Incorrect (Easy)",
        "Hard",
        "Good",
        "Easy"
      ]
    },
    "flashcardEasyText": "Easy",
    "flashcardGoodText": "Good",
    "flashcardHardText": "Hard",
    "flashcardTags": [
      "#fs_all"
    ],
    "convertFoldersToDecks": false,
    "cardCommentOnSameLine": true,
    "burySiblingCards": true,
    "showContextInCards": false,
    "flashcardHeightPercentage": 90,
    "flashcardWidthPercentage": 85,
    "randomizeCardOrder": null,
    "flashcardCardOrder": "EveryCardRandomDeckAndCard",
    "flashcardDeckOrder": "PrevDeckComplete_Sequential",
    "convertHighlightsToClozes": true,
    "convertBoldTextToClozes": false,
    "convertCurlyBracketsToClozes": false,
    "singleLineCardSeparator": "::::",
    "singleLineReversedCardSeparator": ":::",
    "multilineCardSeparator": "?",
    "multilineReversedCardSeparator": "??",
    "editLaterTag": "#edit-later",
    "intervalShowHide": false,
    "enableNoteReviewPaneOnStartup": true,
    "tagsToReview": [
      "",
      "#deck1",
      "#fs_all"
    ],
    "noteFoldersToIgnore": [
      "templater"
    ],
    "openRandomNote": false,
    "autoNextNote": true,
    "reviewResponseFloatBar": true,
    "responseBarPositionPercentage": 5,
    "reviewingNoteDirectly": true,
    "disableFileMenuReviewOptions": true,
    "maxNDaysNotesReviewQueue": 365,
    "initiallyExpandAllSubdecksInTree": false,
    "baseEase": 250,
    "lapsesIntervalChange": 0.5,
    "easyBonus": 1.3,
    "maximumInterval": 36525,
    "maxLinkFactor": 1,
    "showDebugMessages": true,
    "dataLocation": "In the folder specified below",
    "customFolder": "spaced_repetition_data/tracked_files.json",
    "maxNewPerDay": 20,
    "repeatItems": false,
    "trackedNoteToDecks": false,
    "untrackWithReviewTag": false,
    "algorithm": "Fsrs",
    "algorithmSettings": {
      "Fsrs": {
        "revlog_tags": [],
        "request_retention": 0.9,
        "maximum_interval": 36500,
        "w": [
          3.0888,
          5.4256,
          12.6306,
          21.0708,
          5.1018,
          1.6204,
          1.2019,
          0,
          1.7455,
          0,
          1.1326,
          2.0553,
          0.2,
          0.3525,
          1.2435,
          0,
          3.0324
        ]
      }
    },
    "previousRelease": "1.12.4.6",
    "burySiblingCardsByNoteReview": false,
    "multiClozeCard": false
  },
  "buryDate": "2024-06-24",
  "buryList": [
    "13b0a3cc2b8479",
    "4a909d4ac212a",
    "b06e6a6730556",
    "17b1c0bccba413",
    "a7aaa9ac6f5d",
    "11d0353d0a70c9",
    "1fec9b00bb2d79",
    "157620f78d22f6"
  ],
  "historyDeck": "fs_all"
}
Newdea commented 5 months ago

没有报错就不容易查了。试下按以下步骤,看能有什么报错提示

  1. OB中禁用插件,退出OB;

  2. 备份,把 "spaced_repetition_data/tracked_files.json" 这个文件备份到其他位置,再用新版的插件文件替换旧版的;

  3. 打开OB,打开控制台(ctrl + shift + i),清空窗口 image

  4. 启用插件,打开卡片复习窗口,看这个过程中插件相关的报错信息

YIRU69 commented 5 months ago

看来不是我一个人的问题 0.0 是读取的格式有问题吗?按道理来说 1.12.4.4 版本也是重新下载的,不存在自己更改了。 插件没有任何报错,我看过了,就不截图了,报错是的 error,但是没有

YIRU69 commented 5 months ago

还是提供一下截图吧。 image

image

有没有可能是数据文件的位置问题,我的设置是制定在特殊的文件夹中

YIRU69 commented 5 months ago

image 应该是没有识别到文件的原因,我确实把文件放在了这个目录,但是看报错是没有识别到

Newdea commented 5 months ago

应该是没有识别到文件的原因,我确实把文件放在了这个目录,但是看报错是没有识别到

这个路径是在笔记库里么,自定义路径只能相对笔记库根目录,在笔记库外面的目录可能就会存在意想不到的问题。

可以先用插件目录或根目录试下:

  1. 修改设置中的数据位置,关闭OB;
  2. 用备份的数据文件复制替换掉设置对应位置的数据文件;
  3. 开OB看下效果;
YIRU69 commented 5 months ago

是笔记库呀,回滚1.12.4.4版本是没有问题的呀,就是新版本可能在这个地方出现问题

YIRU69 commented 5 months ago

image

我测试两个版本都会出现这个错误,当我按 “save” 按键的时候

YIRU69 commented 5 months ago

test.zip 我上传了测试文件,经过测试,现象完全重现

测试的方案是:先使用1.12.4.4版本来复习卡片,然后升级插件,重启这个库,同样发现了复习数据被重置。目前这个库的版本是1.12.4.4

Newdea commented 5 months ago

应该是同步原插件代码时引入的bug,改了一版,我测试了已经OK,你再试试反馈下效果

main_fix.zip

YIRU69 commented 5 months ago

我通过我的库进行了测试,目前发现没有问题,可以读到复习数据

dryezl commented 5 months ago

将新版中main.js更换成下面文件,我的库也暂时没有问题。

main_fix.zip