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

anki 2.1.50 版本下本地词典无法识别,且界面的“确定”按钮点击无反应 #241

Open
TtlyLynzie opened this issue Apr 14, 2022 · 6 comments

Comments

@TtlyLynzie
Copy link

在 ⁨2.1.50 版本下导入的文件词典文件夹里的词典不能识别出来,且点击界面里的”确定“按钮没有反应

@TtlyLynzie
Copy link
Author

Debug info:
Anki 2.1.50 (26d40c3a) Python 3.9.7 Qt 6.2.3 PyQt 6.2.3
Platform: Mac 12.3.1
Flags: frz=True ao=True sv=3
Add-ons, last update check: 2022-04-18 20:09:48
Add-ons possibly involved: ⁨Fast Word Query Multi-threaded queries for words from local or web dictionaries⁩

Caught exception:
Traceback (most recent call last):
File "/Users/ttlynzie/Library/Application Support/Anki2/addons21/1807206748/gui/foldermanager.py", line 73, in add_folder
config.update({'last_folder': dir_})
File "/Users/ttlynzie/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'

@ffffffff01
Copy link

一样的问题,win10+anki 2.1.50,本地词典无法识别 [界面的“确定”按钮点击无反应

@m430
Copy link

m430 commented May 24, 2022

一样,插件用不了。

@aaabbb0088
Copy link

分享解決的方法,嘗試看看。

  1. 找到插件資料夾下的 context.py 檔案

1807206748/context.py

  1. 在 “config = Config(mw)” 這行前面,加上
wp = mw.pm.profileFolder()
mediaPath = os.path.join(wp, "collection.media") 
os.chdir(mediaPath)

說明一下發生什麼事。

2.1.49之前,開啟程式後,FastWQ預設的工作目錄會是在profile的collection.media。
所以可以正常讀取和寫入FastWQ的設定檔。

2.1.5X之後,FastWQ預設的工作目錄變成根目錄 / ,所以變成沒有權限寫入該資料夾。
上面的code是先抓到正確路徑,修改工作目錄,之後就正常了。

@ffffffff01
Copy link

ffffffff01 commented Jul 3, 2022

wp = mw.pm.profileFolder()
mediaPath = os.path.join(wp, "collection.media")
os.chdir(mediaPath)

谢谢,按照您的方法,已经可以使用fastwq了。

不过发现另外一个问题,fastwq导入的单词解释,好像不会应用设置的css style,看上去比较混乱了,应该也是由于工作目录改变引起的,因为css文件是在collection.media下,但是不知道在哪里改工作目录可以引入css style,请大佬帮忙看看,多谢!

@SOREMUZ
Copy link

SOREMUZ commented Sep 6, 2023

你好,已经有好心人修复这个插件了,请在这里安装,please get the fixed version of FWQ from here : https://ankiweb.net/shared/info/103636257

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

5 participants