Jakethesnake Posted July 19, 2016 Posted July 19, 2016 Started using the VNR program for the 1st time and went into the Preferences/Dictionaries to install "EDICT Japanese English dictionary but when i click install a window comes up called getedict.py and closes after a few seconds and it does not install the EDICT and when i look inside the EDICT folder its empty. Could someone help me out and tell me what i need to do to fix this problem ? Quote
ma-tor Posted July 20, 2016 Posted July 20, 2016 (edited) Hi, I've ran into the same problem (it seems that the script can't extract edict properly), but managed to workaround it. It's not pretty but i am too lazy to find a proper solution: 1. edit Library\Frameworks\Sakura\py\scripts\getedict.py (make a backup first) 2. change line 56 (DO mind that lines are indented with spaces and not tabs (which are defult when inserting new lines with notepad++)) to Quote if sknetio.getfile(url, path, flush=False, gzip=False): 3. after this line insert the following line (mind the extra 2 space indent) Quote u_var = raw_input("unzip then enter any text and press enter") this makes the script wait for us to provide a properly unzipped file 4. try installing edict 5. when the script stops with the message: "unzip then enter any text and press enter" browse to \Caches\tmp\ 6. there should be a file called edict2u, unzip it with 7zip and place the file named the same to \Caches\tmp\ (overwrite) 7. enter any text to the script and press enter, it should install it without further problems edit: it's line 56 (it should look the same but with gzip=True) Edited July 21, 2016 by ma-tor fixed line number Quote
Sciurus Posted July 29, 2016 Posted July 29, 2016 Thank you for the solution. Just tried it, worked without a hitch. Quote
laserbeak43 Posted August 14, 2016 Posted August 14, 2016 This isn't as old a post as I originally thought. I'll continue my conversation here, if you don't mind. I would get a message saying edict is already downloaded, but it still wouldn't be installed. After taking your advice, it closes even quicker now. Am I supposed to switch this: if sknetio.getfile(url, path, flush=False, gzip=True): ok = skfileio.filesize(path) > minsize With this?: if sknetio.getfile(url, path, flush=False, gzip=False): u_var = raw_input("unzip then enter any text and press enter") ok = skfileio.filesize(path) > minsize -Edit- Opened it up and edited it in IDLE and now, I get to the prompt asking me to enter text and press enter, so I hit space and press enter. still not installed. Quote
impulsedolphin Posted August 15, 2016 Posted August 15, 2016 Hi I had all your problems but then I used Sublime text editor and then it started working! Hope it helps! esper 1 Quote
esper Posted August 18, 2016 Posted August 18, 2016 On 8/15/2016 at 0:36 PM, impulsedolphin said: Hi I had all your problems but then I used Sublime text editor and then it started working! Hope it helps! Thanks, its works On 8/14/2016 at 9:38 PM, laserbeak43 said: This isn't as old a post as I originally thought. I'll continue my conversation here, if you don't mind. I would get a message saying edict is already downloaded, but it still wouldn't be installed. After taking your advice, it closes even quicker now. Am I supposed to switch this: if sknetio.getfile(url, path, flush=False, gzip=True): ok = skfileio.filesize(path) > minsize With this?: if sknetio.getfile(url, path, flush=False, gzip=False): u_var = raw_input("unzip then enter any text and press enter") ok = skfileio.filesize(path) > minsize -Edit- Opened it up and edited it in IDLE and now, I get to the prompt asking me to enter text and press enter, so I hit space and press enter. still not installed. Download dictionary from here, replace the file in the \Caches\tmp\ after you pressed install ftp://ftp.edrdg.org/pub/Nihongo/00INDEX.html edict2u.gz extract that file using 7zip Quote
Ryū Posted August 26, 2016 Posted August 26, 2016 On 8/14/2016 at 11:36 PM, impulsedolphin said: Hi I had all your problems but then I used Sublime text editor and then it started working! Hope it helps! Did the same after trying everything else and this works great Quote
terror100 Posted October 18, 2016 Posted October 18, 2016 this also dous not work for me maybe i did something wrong what i don't know Quote
Percutient Posted December 7, 2016 Posted December 7, 2016 Anyone got time to check inside \VNR\Visual Novel Reader\Caches\Dictionaries\EDICT and tell me what the name of the file is? Is it edict2u? Using that name doesn't work and getedict.py doesn't tell me what the name should be like getkanjidic.py did. Quote
JSB Posted January 8, 2017 Posted January 8, 2017 Someone noticed above that "gzip" should be set to False in line 56. It looks like that the "gzip=True" parameter was supposed to decompress the file before saving it to /tmp, but it didn't. So the whole installation script can be fixed by manually decompressing, and you don't need to download it yourself. Just make sure getedict.py looks like this (the 5 lines starting with "if sknetio" are the changed/added lines): with SkProfiler("fetch"): # gzip=True to automatically extract gzip # flush=false to use more memory to reduce disk access if sknetio.getfile(url, path + '.gz', flush=False, gzip=False): import gzip, shutil with gzip.open(path + '.gz') as f_in, open(path, 'wb') as f_out: shutil.copyfileobj(f_in, f_out) skfileio.removefile(path + '.gz') ok = skfileio.filesize(path) > minsize if not ok and os.path.exists(path): skfileio.removefile(path) A very similar problem exists for KanjDic, and the same exact code can fix it. In getkanjidic.py: with SkProfiler("fetch"): # gzip=True to automatically extract gzip # flush=false to use more memory to reduce disk access if sknetio.getfile(url, path + '.gz', flush=False, gzip=False): import gzip, shutil with gzip.open(path + '.gz') as f_in, open(path, 'wb') as f_out: shutil.copyfileobj(f_in, f_out) skfileio.removefile(path + '.gz') ok = skfileio.filesize(path) > minsize if ok: os.renames(path, targetpath) I could have fixed sknetio.py instead to actually work with gzip=True but oh well. I'm pretty sure this is it anyway. Quote
vikas2316 Posted November 4, 2018 Posted November 4, 2018 can someone lend me a hand? i installed sanseido daijirin dictionary and specified it's location and then i enabled it in translation but i don't know to use it. i am kinda new to vnr dictionary stuff. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.