I think I've solved this problem on my own. Earlier I captured the output of running devede from the console in a file. There's a lot of output, but I was able to find some useful information by cross-referencing with the code files from github.
The command that was failing is iconv and when I run it manually, it reports this error:
iconv: illegal input sequence at position 151
So, there's a character in the file that iconv doesn't like and that's what's causing the problem with the subtitles. Since the problem only occurs with subtitle files that have some kind of problem, it has probably made it difficult to reproduce.
I looked at the man page for iconv and found that I could work around the problem if I convert the file manually and append //IGNORE to the --to-code argument before running devede that this problem goes away.
This quote from the man page tells why:
//IGNORE
When the string "//IGNORE" is appended to --to-code, characters that cannot be represented in the target character set will be
silently discarded.
I don't think there's much that could be done to correct the problem automatically, but changing the wording of the error message might be helpful. I suggest "Subtitle format conversion failed. Your subtitles file may be formatted incorrectly." ... at or around line 75 of devede_subtitles.py.
Unfortunately, there's a new problem "Conversion failed. It seems a bug of SPUMUX.", but that should be a separate thread.
--
Ghodmode
http://www.ghodmode.com/blog