View Single Post
Old 07-09-2017, 09:11 PM   #1
MGlitch
Wizard
MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.
 
Posts: 2,855
Karma: 22003124
Join Date: Aug 2014
Device: Kobo Forma, Kobo Sage, Kobo Libra 2
help with penelope OS X

I'm trying to convert a stardict to kobo dict, for what should be obvious reasons. I've got penelope installed, I have marisa installed. I have penelope 'working' in that I can type penelope and then a various command and it does something, i.e. penelope -h does generate a list of commands I can use.

However when I try and convert a stardict to kobo i get

Code:
penelope -i /Users/Glitch/Downloads/MalazanDict.zip -j stardict -f en -t en -p kobo -o mk-it
[INFO] Reading input file(s)...
Traceback (most recent call last):
  File "/usr/local/bin/penelope", line 27, in <module>
    main()
  File "/usr/local/bin/penelope", line 23, in main
    package_main()
  File "/Library/Python/2.7/site-packages/penelope/__main__.py", line 84, in main
    dictionary = read_dictionary(arguments)
  File "/Library/Python/2.7/site-packages/penelope/dictionary.py", line 80, in read_dictionary
    return penelope.format_stardict.read(dictionary, args, input_file_paths)
  File "/Library/Python/2.7/site-packages/penelope/format_stardict.py", line 259, in read
    result = read_single_file(dictionary, args, input_file_path)
  File "/Library/Python/2.7/site-packages/penelope/format_stardict.py", line 187, in read_single_file
    ifo_dict = read_ifo(extracted_files["d.ifo"], has_syn, args)
  File "/Library/Python/2.7/site-packages/penelope/format_stardict.py", line 100, in read_ifo
    ifo_unicode = ifo_bytes.decode("utf-8")     # unicode, always utf-8 by spec
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/encodings/utf_8.py", line 16, in decode
    return codecs.utf_8_decode(input, errors, True)
UnicodeDecodeError: 'utf8' codec can't decode byte 0x92 in position 213: invalid start byte
the stardict in question is from http://thefictionary.net/steven-erikson/ I'm using version 14 from this site.

A quick google indicates this may be an issue with an asci character, but I'm in the dark as to how to resolve it.

Any help would be appreciated, I want to learn how to do this since the dictionary in question will be updated at later dates as more books in the Malazan series are released.
MGlitch is offline   Reply With Quote