Closed SOREMUZ closed 8 months ago
Hi @SOREMUZ , Thanks for reporting
This error happens if Anki can't write "Fast Word Query" config file (_fastwqcfg.json
) into the user's home directory. I guess it will be /Users/chikane/_fastwqcfg.json
on your machine.
This is related to filesystem configuration of your machine. To simplify your investigation I added full path to log and to error message. E.g. 2023-11-07 00:20:20,422 Config update DEBUG Update file: /home/aleks/_fastwqcfg.json
.
Try to update the add-on, find exact path to the config file and check why this file is read-only.
Logs location on your machine: /Users/chikane/Library/Application Support/Anki2/addons21/1956435337/fastwordquery-3.log
Please, let me know about the results.
Hi Aleksey,here is the log file
2023-11-07 12:53:51,651 root
I tried to add the following code to the context.py file,then the addon works fine now.
wp = mw.pm.profileFolder() mediaPath = os.path.join(wp, "collection.media") os.chdir(mediaPath)
Hi @SOREMUZ , Thanks for reporting
This error happens if Anki can't write "Fast Word Query" config file (
_fastwqcfg.json
) into the user's home directory. I guess it will be/Users/chikane/_fastwqcfg.json
on your machine. This is related to filesystem configuration of your machine. To simplify your investigation I added full path to log and to error message. E.g.2023-11-07 00:20:20,422 Config update DEBUG Update file: /home/aleks/_fastwqcfg.json
.Try to update the add-on, find exact path to the config file and check why this file is read-only.
Logs location on your machine:
/Users/chikane/Library/Application Support/Anki2/addons21/1956435337/fastwordquery-3.log
Please, let me know about the results.
Hi @SOREMUZ ,
I see in your logs that you're running Anki from the file system root (/
). So, "Fast Query Word" add-on tries to write config to /_fastwqcfg.json
, but this folder is read-only.
I modified add-on logic in such way that it stores config file into "user home directory" instead of "current working directory". In your case, the config file will be stored at /Users/chikane/_fastwqcfg.json
, which is writable usually. Please, upgrade your Anki to the latest version.
In your code snippet, you store the config file within the collection data directory, which is not a proper place for plugin configs. Copy you config /Users/chikane/Library/Application Support/Anki2/chikane/collection.media/_fastwqcfg.json
to /Users/chikane/_fastwqcfg.json
to preserve your settings.
Hi Aleksey,thank you for updating this addon,but when I opened it some errors popped up
Error An error occurred. Please start Anki while holding down the shift key, which will temporarily disable the add-ons you have installed. If the issue only occurs when add-ons are enabled, please use the Tools>Add-ons menu item to disable some add-ons and restart Anki, repeat until you discover the add-on that is causing the problem. When you've discovered the add-on that is causing the problem, please report the issue on the add-ons section of our support site. Debug info: Anki 23.10 (51a10f09) Python 3.9.15 Qt 6.5.3 PyQt 6.5.3 Platform: macOS-13.2.1-arm64-arm-64bit Flags: frz=True ao=True sv=3 Add-ons, last update check: 2023-11-05 22:47:12 Add-ons possibly involved: Fast Word Query 3
Caught exception: Traceback (most recent call last): File "/Users/chikane/Library/Application Support/Anki2/addons21/1956435337/gui/options.py", line 182, in _after_build self.build_tabs_layout() File "/Users/chikane/Library/Application Support/Anki2/addons21/1956435337/gui/options.py", line 248, in build_tabs_layout self.save() File "/Users/chikane/Library/Application Support/Anki2/addons21/1956435337/gui/options.py", line 318, in save config.update(data) File "/Users/chikane/Library/Application Support/Anki2/addons21/1956435337/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'