nofxx / subtitle_it

Download, edit and create subtitles. Supports various formats.
MIT License
35 stars 9 forks source link

Error converting from sub to srt #19

Open thorsteneckel opened 8 years ago

thorsteneckel commented 8 years ago

I have issues converting subtitles from the sub to the srt format.

subtitle_it -c srt my.sub and subtitle_it my.sub my.srt

throw the following error:

Working on file my.sub...
Converting `` to `UTF-8`
/Users/thorsteneckel/.rvm/gems/ruby-2.2.3/gems/subtitle_it-2.0.1/lib/subtitle_it/subtitle.rb:60:in `convert': wrong argument type nil (expected String) (TypeError)
  from /Users/thorsteneckel/.rvm/gems/ruby-2.2.3/gems/subtitle_it-2.0.1/lib/subtitle_it/subtitle.rb:60:in `encode_dump'
  from /Users/thorsteneckel/.rvm/gems/ruby-2.2.3/gems/subtitle_it-2.0.1/lib/subtitle_it/subtitle.rb:67:in `parse_dump'
  from /Users/thorsteneckel/.rvm/gems/ruby-2.2.3/gems/subtitle_it-2.0.1/lib/subtitle_it/subtitle.rb:40:in `initialize'
  from /Users/thorsteneckel/.rvm/gems/ruby-2.2.3/gems/subtitle_it-2.0.1/lib/subtitle_it/bin.rb:9:in `new'
  from /Users/thorsteneckel/.rvm/gems/ruby-2.2.3/gems/subtitle_it-2.0.1/lib/subtitle_it/bin.rb:9:in `run!'
  from /Users/thorsteneckel/.rvm/gems/ruby-2.2.3/gems/subtitle_it-2.0.1/lib/subtitle_it/bin.rb:102:in `run!'
  from /Users/thorsteneckel/.rvm/gems/ruby-2.2.3/gems/subtitle_it-2.0.1/bin/subtitle_it:68:in `<top (required)>'
  from /Users/thorsteneckel/.rvm/gems/ruby-2.2.3/bin/subtitle_it:23:in `load'
  from /Users/thorsteneckel/.rvm/gems/ruby-2.2.3/bin/subtitle_it:23:in `<main>'
  from /Users/thorsteneckel/.rvm/gems/ruby-2.2.3/bin/ruby_executable_hooks:15:in `eval'
  from /Users/thorsteneckel/.rvm/gems/ruby-2.2.3/bin/ruby_executable_hooks:15:in `<main>'

installed via gem, dependencies via brew.

nofxx commented 8 years ago

Strange, it couldn't detect your subtiltle file encoding. Try saving the original subtitle again (paste in a text editor), forcing UTF-8.

nofxx commented 8 years ago

Anyways, if you can, post the original file somewhere so I can test. Or clone this repo and push the file in spec/fixtures ... I will write the tests later.

thorsteneckel commented 8 years ago

Thanks!

Archiv.zip