FooSoft / yomichan-anki

Plugin for sentence/vocab mining Japanese books in Anki.
https://foosoft.net/projects/yomichan-anki
Other
58 stars 12 forks source link

An error of Yomichan for Anki #16

Open XfeiRan opened 7 years ago

XfeiRan commented 7 years ago

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\japaneseinit.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

dayjaby commented 7 years ago

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?

XfeiRan commented 7 years ago

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 commented 7 years ago

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.

dayjaby commented 7 years ago

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.

XfeiRan commented 7 years ago

OK.But there are too many users named davidjablonski.

FooSoft commented 7 years ago

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

Should be fixed now.

XfeiRan commented 7 years ago

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\japaneseinit.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)

FooSoft commented 7 years ago

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.