lovac42/Cronholio

config.json 出错!

Closed this issue · 3 comments

我注意到,你已经提交了Beta2,我修改了config.json,如下所示:
{
"hotkey": "Shift+t",
"add_tag_to_notes_even_multi_cards": True,
"macros": {
"h": "@hourly",
"d": "@daily",
"ed": "0 0 */2 * *",
"od": "0 0 1-31/2 * *",
"eye": "0 0 */15 * *",
"wd": "0 0 * * mon-fri",
"we": "0 0 * * sun,sat",
"thur": "0 0 * * thu",
"thurs": "0 0 * * thu"
}
}

再打开程序,就报错了,不能运行。报错如下:

一个插件发生了错误。
请把它报告在插件的论坛上:
https://anki.tenderapp.com/discussions/add-ons

Traceback (most recent call last):
File "aqt\main.py", line 165, in onOpenProfile
File "aqt\main.py", line 244, in loadProfile
File "anki\hooks.py", line 26, in runHook
File "C:\Users\wangcb\AppData\Roaming\Anki2\addons\cronholio\cronholio.py", line 132, in loadMacros
config=json.loads(data)
File "json_init
.py", line 339, in loads

File "json\decoder.py", line 364, in decode
File "json\decoder.py", line 382, in raw_decode
ValueError: No JSON object could be decoded

增加标签到笔记对我来说,也是一个很好的功能,但这个版本也不能运行了。

You didn't change the json file correctly.

Try this:

{
"hotkey": "T",
"add_tag_to_notes_even_multi_cards": true,
"macros": {
"h": "@hourly",
"d": "@daily",
"ed": "0 0 */2 * *",
"od": "0 0 1-31/2 * *",
"eye": "0 0 */15 * *",
"wd": "0 0 * * mon-fri",
"we": "0 0 * * sun,sat",
"thur": "0 0 * * thu",
"thurs": "0 0 * * thu"
}
}

Are you using Anki2.0? I am working on an addon manager that will fix this in the next version. On 2.1, you can edit the file using Anki and it will warn you about errors like this.

我用的2.0版, 按照你的方法改成了"T", 虽然不报错, 但并不起作用。

You might have a key conflict with another addon. Try changing it to another key.
T = shift+ t
B = shift + b