Jump to content

JSB

Members
  • Posts

    1
  • Joined

  • Last visited

JSB's Achievements

Newbie

Newbie (1/11)

0

Reputation

  1. 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.
×
×
  • Create New...