scrapper/postrunner

Can't import fit file

Closed this issue · 4 comments

315i commented

Hi ,

just installed postrunner, but get error when trying to import .fit file.
Below is the error.

INFO: Creating PostRunner data directory /root/.postrunner
INFO: Creating HTML output directory /root/.postrunner/html
INFO: Creating devices directory /root/.postrunner/devices
INFO: Creating Old Fit directory /root/.postrunner/old_fit_dir
INFO: Creating fit directory /root/.postrunner/fit
ERROR: selection '0' does not exist in :choices for obj.local_message_type
/usr/local/rvm/gems/ruby-2.1.0/gems/bindata-2.1.0/lib/bindata/choice.rb:119:in instantiate_choice' /usr/local/rvm/gems/ruby-2.1.0/gems/bindata-2.1.0/lib/bindata/choice.rb:113:in current_choice'
(eval):2:in do_read' /usr/local/rvm/gems/ruby-2.1.0/gems/bindata-2.1.0/lib/bindata/struct.rb:131:in block in do_read'
/usr/local/rvm/gems/ruby-2.1.0/gems/bindata-2.1.0/lib/bindata/struct.rb:131:in each' /usr/local/rvm/gems/ruby-2.1.0/gems/bindata-2.1.0/lib/bindata/struct.rb:131:in do_read'
/usr/local/rvm/gems/ruby-2.1.0/gems/bindata-2.1.0/lib/bindata/base.rb:146:in read' /usr/local/rvm/gems/ruby-2.1.0/gems/bindata-2.1.0/lib/bindata/base.rb:23:in read'
/usr/local/rvm/gems/ruby-2.1.0/gems/fit4ruby-1.3.0/lib/fit4ruby/FitRecord.rb:37:in read' /usr/local/rvm/gems/ruby-2.1.0/gems/fit4ruby-1.3.0/lib/fit4ruby/FitFile.rb:53:in read'
/usr/local/rvm/gems/ruby-2.1.0/gems/fit4ruby-1.3.0/lib/fit4ruby.rb:18:in read' /usr/local/rvm/gems/ruby-2.1.0/gems/postrunner-0.7.2/lib/postrunner/Main.rb:474:in import_fit_file'
/usr/local/rvm/gems/ruby-2.1.0/gems/postrunner-0.7.2/lib/postrunner/Main.rb:462:in process_file' /usr/local/rvm/gems/ruby-2.1.0/gems/postrunner-0.7.2/lib/postrunner/Main.rb:447:in block in process_files'
/usr/local/rvm/gems/ruby-2.1.0/gems/postrunner-0.7.2/lib/postrunner/Main.rb:441:in each' /usr/local/rvm/gems/ruby-2.1.0/gems/postrunner-0.7.2/lib/postrunner/Main.rb:441:in process_files'
/usr/local/rvm/gems/ruby-2.1.0/gems/postrunner-0.7.2/lib/postrunner/Main.rb:345:in execute_command' /usr/local/rvm/gems/ruby-2.1.0/gems/postrunner-0.7.2/lib/postrunner/Main.rb:77:in main'
/usr/local/rvm/gems/ruby-2.1.0/gems/postrunner-0.7.2/lib/postrunner.rb:24:in <module:PostRunner>' /usr/local/rvm/gems/ruby-2.1.0/gems/postrunner-0.7.2/lib/postrunner.rb:22:in <top (required)>'
/usr/local/rvm/rubies/ruby-2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in require' /usr/local/rvm/rubies/ruby-2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in require'
/usr/local/rvm/gems/ruby-2.1.0/gems/postrunner-0.7.2/bin/postrunner:4:in <top (required)>' /usr/local/rvm/gems/ruby-2.1.0/bin/postrunner:22:in load'
/usr/local/rvm/gems/ruby-2.1.0/bin/postrunner:22:in <main>' /usr/local/rvm/gems/ruby-2.1.0/bin/ruby_executable_hooks:15:in eval'
/usr/local/rvm/gems/ruby-2.1.0/bin/ruby_executable_hooks:15:in `

'


You have triggered a bug in PostRunner 0.7.2!

Looks like fit4ruby can't process your FIT file. Which device generated the file (which firmware version)? Can you import it successfully to Garmin Connect via the web import feature? Can you send it to me for debugging (chris at linux.com)?

I cound not reproduce the problem with my current fit4ruby version. But there were a lot of warnings due to unknown messages and fields. I've fixed those in fit4ruby 1.5.0 now. Please let me know if the import still doesn't work.

315i commented

Hi,
I updated fit4ruby to v1.5.0., but now I get different error.

/usr/local/rvm/rubies/ruby-2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/dependency.rb:310:in to_specs': Could not find 'fit4ruby' (~> 1.3.0) - did find: [fit4ruby-1.5.0] (Gem::MissingSpecVersionError) Checked in 'GEM_PATH=/usr/local/rvm/gems/ruby-2.1.0:/usr/local/rvm/gems/ruby-2.1.0@global', execute gem envfor more information from /usr/local/rvm/rubies/ruby-2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/specification.rb:1439:inblock in activate_dependencies'
from /usr/local/rvm/rubies/ruby-2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/specification.rb:1428:in each' from /usr/local/rvm/rubies/ruby-2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/specification.rb:1428:in activate_dependencies'
from /usr/local/rvm/rubies/ruby-2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/specification.rb:1410:in activate' from /usr/local/rvm/rubies/ruby-2.1.0/lib/ruby/site_ruby/2.1.0/rubygems.rb:299:in block in activate_bin_path'
from /usr/local/rvm/rubies/ruby-2.1.0/lib/ruby/site_ruby/2.1.0/rubygems.rb:299:in synchronize' from /usr/local/rvm/rubies/ruby-2.1.0/lib/ruby/site_ruby/2.1.0/rubygems.rb:299:in activate_bin_path'
from /usr/local/rvm/gems/ruby-2.1.0/bin/postrunner:22:in <main>' from /usr/local/rvm/gems/ruby-2.1.0/bin/ruby_executable_hooks:15:in eval'
from /usr/local/rvm/gems/ruby-2.1.0/bin/ruby_executable_hooks:15:in `

'

I've released postrunner version 0.7.4 to make it easier. Please try that version.