Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

选择卡片类型后发生错误 #259

Open
free521521521 opened this issue Dec 21, 2022 · 1 comment
Open

选择卡片类型后发生错误 #259

free521521521 opened this issue Dec 21, 2022 · 1 comment

Comments

@free521521521
Copy link

free521521521 commented Dec 21, 2022

错误
发生了一个错误。请在启动Anki时按住「Shift」键临时禁用插件加载。 如仅在插件启用时出错,请使用「工具」>「插件」功能禁用部分插件后重启Anki, 请重复上述步骤直至找到引起错误的插件。 找到引起错误的插件后,请反馈给插件作者。 调试信息:
Anki 2.1.54 (b6a7760c) Python 3.9.7 Qt 6.3.1 PyQt 6.3.1
Platform: Mac 12.6
Flags: frz=True ao=True sv=2
Add-ons, last update check: 2022-12-22 01:02:05
相关插件:⁨Fast Word Query Multi-threaded queries for words from local or web dictionaries⁩

Caught exception:
Traceback (most recent call last):
File "/Users/username/Library/Application Support/Anki2/addons21/1807206748/gui/options.py", line 220, in btn_models_pressed
self.build_tabs_layout()
File "/Users/username/Library/Application Support/Anki2/addons21/1807206748/gui/options.py", line 250, in build_tabs_layout
self.save()
File "/Users/username/Library/Application Support/Anki2/addons21/1807206748/gui/options.py", line 322, in save
config.update(data)
File "/Users/username/Library/Application Support/Anki2/addons21/1807206748/context.py", line 60, in update
with open(self.path, 'w', encoding='utf-8') as f:
OSError: [Errno 30] Read-only file system: '_fastwqcfg.json'

@AnkiStudio
Copy link

打开插件-插件文件,定位到插件所在的目录路径,找到context.py文件
打开该文件【随你用文本编辑器还是VScode还是Pycharm】
滚动到该文件底部

config = Config(mw)
替换为
wp = mw.pm.profileFolder()
mediaPath = os.path.join(wp, "collection.media")
os.chdir(mediaPath)
config = Config(mw)

保存并退出路径,退出Anki。
然后再进入Anki即可。

该方法适用于解决自2.1.50版本起,本插件无法正常工作的问题。
测试于MacBook Pro M1 2.1.55以及Win 11 2.1.55 的Anki

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants