yomichan-anki icon indicating copy to clipboard operation
yomichan-anki copied to clipboard

An error of Yomichan for Anki

Open XfeiRan opened this issue 8 years ago • 8 comments

It's an add-on for Japanese learner.And it's download code is 934748696(https://ankiweb.net/shared/info/934748696). I wanted to install this add-on,but something wrong happened.And I can't fix it. **After i restarted Anki,there was an error: Traceback (most recent call last): File "aqt\addons.py", line 41, in loadAddons File "C:\Users\���ߺ�\Documents\Anki\addons\yomichan.py", line 97, in instance = YomichanPlugin() File "C:\Users\���ߺ�\Documents\Anki\addons\yomichan.py", line 38, in init Yomichan.init(self) File "C:\Users\���ߺ�\Documents\Anki\addons\yomichan.py", line 30, in init self.language = japanese.initLanguage() File "C:\Users\���ߺ�\Documents\Anki\addons\yomi_base\japanese__init__.py", line 29, in initLanguage dictionary.Dictionary(os.path.join(directory, 'dictionary.db')) File "C:\Users\���ߺ�\Documents\Anki\addons\yomi_base\japanese\dictionary.py", line 25, in init self.db = sqlite3.connect(filename) OperationalError: unable to open database file

XfeiRan avatar Aug 23 '16 02:08 XfeiRan

Did you open the file Anki\addons\yomi_base\japanese\dictionary.db manually in another program? Or did you open Anki multiple times? If not, can you make sure this file exists?

dayjaby avatar Aug 23 '16 06:08 dayjaby

I didn't open dictionary.db in another program. I just followed the steps to install this add-on by code and restarted Anki.(No other actions) And then this error happened. I check the file and this file exists.

XfeiRan avatar Aug 23 '16 07:08 XfeiRan

Also,when i use this add-on (https://ankiweb.net/shared/info/907186589) ,there is another error.

Traceback (most recent call last): File "aqt\errors.py", line 101, in onTimeout UnicodeDecodeError: 'ascii' codec can't decode byte 0xd5 in position 52: ordinal not in range(128)

I have checked the database in Tools menu,but this still happened.

XfeiRan avatar Aug 23 '16 07:08 XfeiRan

I am the developer of this second plugin (https://ankiweb.net/shared/info/907186589), and I can't reproduce either of both errors. If you are interested, we can do some bugfixing together over Skype or Teamviewer? My skype ID would be davidjablonski. We can fix either FooSoft's Yomichan or my Yomichan.

dayjaby avatar Aug 23 '16 07:08 dayjaby

OK.But there are too many users named davidjablonski.

XfeiRan avatar Aug 23 '16 10:08 XfeiRan

Re-download https://ankiweb.net/shared/info/934748696

Should be fixed now.

FooSoft avatar Aug 23 '16 16:08 FooSoft

New error. Traceback (most recent call last): File "aqt\addons.py", line 41, in loadAddons File "C:\Users\���ߺ�\Documents\Anki\addons\yomichan.py", line 97, in instance = YomichanPlugin() File "C:\Users\���ߺ�\Documents\Anki\addons\yomichan.py", line 38, in init Yomichan.init(self) File "C:\Users\���ߺ�\Documents\Anki\addons\yomichan.py", line 30, in init self.language = japanese.initLanguage() File "C:\Users\���ߺ�\Documents\Anki\addons\yomi_base\japanese__init__.py", line 28, in initLanguage deinflect.Deinflector(os.path.join(directory, u'deinflect.json')), File "ntpath.py", line 108, in join UnicodeDecodeError: 'ascii' codec can't decode byte 0xd5 in position 9: ordinal not in range(128)

XfeiRan avatar Aug 24 '16 04:08 XfeiRan

I'll investigate. What is happening is that your user name in Windows is messing up directory and file operations because they aren't handling unicode.

FooSoft avatar Aug 24 '16 05:08 FooSoft