view · edit · sidebar · attach · print · history

Index>

20170601-fix-importer-problems

Summary

  • Fix error in SL-Update (XML)
  • Undefined method in virbac invoicer
  • Encoding::UndefinedConversionError in vetoquinol updater
  • Keep in Mind

Commits

Index

Fix error in SL-Update (XML)

Got the following error mail

Plugin: ODDB::BsvXmlPlugin

Error: ODDB::Persistence::InvalidPathError
Message: :!registration,55829!!package,010. -> undefined Method ODDB::Registration::02()
@report: {:name_base=>"Ebixa", :name_descr=>"Tropfen 10 mg/g ", :swissmedic_no5_bag=>"55829", :deductible=>:deductible_g, :generic_type=>:unknown, :swissmedic_no5_oddb=>"55829", :swissmedic_no8_bag=>"55829014"}
Backtrace:
/var/www/oddb.org/src/util/persistence.rb:314:in `block in resolve'
/var/www/oddb.org/src/util/persistence.rb:297:in `each'
/var/www/oddb.org/src/util/persistence.rb:297:in `resolve'
/var/www/oddb.org/src/plugin/bsv_xml.rb:322:in `block in tag_end'
/var/www/oddb.org/src/plugin/bsv_xml.rb:321:in `each'
/var/www/oddb.org/src/plugin/bsv_xml.rb:321:in `tag_end'
/usr/local/ruby-2.4.0/lib/ruby/2.4.0/rexml/parsers/streamparser.rb:29:in `parse'
/usr/local/ruby-2.4.0/lib/ruby/2.4.0/rexml/document.rb:242:in `parse_stream'
/var/www/oddb.org/src/plugin/bsv_xml.rb:916:in `update_preparations'
/var/www/oddb.org/src/plugin/bsv_xml.rb:602:in `block (2 levels) in _update'
/var/www/oddb.org/vendor/bundle/ruby/2.4.0/gems/rubyzip-1.2.0/lib/zip/entry.rb:495:in `get_input_stream'
/var/www/oddb.org/src/plugin/bsv_xml.rb:602:in `block in _update'
/var/www/oddb.org/vendor/bundle/ruby/2.4.0/gems/rubyzip-1.2.0/lib/zip/entry_set.rb:38:in `block in each'
/var/www/oddb.org/vendor/bundle/ruby/2.4.0/gems/rubyzip-1.2.0/lib/zip/entry_set.rb:37:in `each'
/var/www/oddb.org/vendor/bundle/ruby/2.4.0/gems/rubyzip-1.2.0/lib/zip/entry_set.rb:37:in `each'
/var/www/oddb.org/vendor/bundle/ruby/2.4.0/gems/rubyzip-1.2.0/lib/zip/central_directory.rb:182:in `each'
/var/www/oddb.org/vendor/bundle/ruby/2.4.0/gems/rubyzip-1.2.0/lib/zip/file.rb:149:in `block in foreach'
/var/www/oddb.org/vendor/bundle/ruby/2.4.0/gems/rubyzip-1.2.0/lib/zip/file.rb:102:in `open'
/var/www/oddb.org/vendor/bundle/ruby/2.4.0/gems/rubyzip-1.2.0/lib/zip/file.rb:148:in `foreach'
/var/www/oddb.org/src/plugin/bsv_xml.rb:597:in `_update'
/var/www/oddb.org/src/plugin/bsv_xml.rb:592:in `update'
/var/www/oddb.org/src/util/updater.rb:299:in `block in update_bsv'
/var/www/oddb.org/src/util/updater.rb:544:in `wrap_update'
/var/www/oddb.org/src/util/updater.rb:297:in `update_bsv'
/var/www/oddb.org/src/util/updater.rb:221:in `run'
jobs/import_daily:13:in `block in <module:Util>'
/var/www/oddb.org/src/util/job.rb:40:in `run'
jobs/import_daily:12:in `<module:Util>'
jobs/import_daily:11:in `<module:ODDB>'
jobs/import_daily:10:in `<main>'

Running import_bsv_only on oddb-ci2 to try to catch the error after adding a binding.pry in bsv_xml.rb. The import ran without problem on oddb-ci2. Therefore dropping and reloading yesterday dumps from thinpower and starting import_daily.

After a long time the breakpoint got activated. Looks like we have problem dealing whith outdated packages as the package 14 for registration 55829 is not the in the swissmedic packages. I think I will simply skip the sl_entry. Restarting import_daily.

Pushed commit Rescue to avoid error in outdated pack

This did not fix the problem entirely. Therefore pushed another commit Rescue to avoid error in outdated pack (Limitation)

Undefined method in virbac invoicer

Got the following e-mail

NoMethodError
undefined method `+' for nil:NilClass
/var/www/virbac.bbmb.ch/vendor/bundle/ruby/2.4.0/gems/bbmb-2.2.8/lib/bbmb/util/invoicer.rb:21:in `block in run'
/var/www/virbac.bbmb.ch/vendor/bundle/ruby/2.4.0/gems/bbmb-2.2.8/lib/bbmb/util/invoicer.rb:20:in `each'
/var/www/virbac.bbmb.ch/vendor/bundle/ruby/2.4.0/gems/bbmb-2.2.8/lib/bbmb/util/invoicer.rb:20:in `inject'
/var/www/virbac.bbmb.ch/vendor/bundle/ruby/2.4.0/gems/bbmb-2.2.8/lib/bbmb/util/invoicer.rb:20:in `run'
/var/www/virbac.bbmb.ch/vendor/bundle/ruby/2.4.0/gems/bbmb-2.2.8/lib/bbmb/util/server.rb:36:in `invoice'
/var/www/virbac.bbmb.ch/vendor/bundle/ruby/2.4.0/gems/bbmb-2.2.8/lib/bbmb/util/server.rb:79:in `block (2 levels) in run_invoicer'
/var/www/virbac.bbmb.ch/vendor/bundle/ruby/2.4.0/gems/bbmb-2.2.8/lib/bbmb/util/server.rb:69:in `loop'
/var/www/virbac.bbmb.ch/vendor/bundle/ruby/2.4.0/gems/bbmb-2.2.8/lib/bbmb/util/server.rb:69:in `block in run_invoicer'

Okay. This is another effect of the broken order. Total and order_id could not be calculated. Fixed with

Encoding::UndefinedConversionError in vetoquinol updater

Encoding::UndefinedConversionError
"\xC4" from ASCII-8BIT to UTF-8
/var/www/vetoquinol.bbmb.ch/lib/bbmb/util/csv_importer.rb:33:in `encode'
/var/www/vetoquinol.bbmb.ch/lib/bbmb/util/csv_importer.rb:33:in `string'
/var/www/vetoquinol.bbmb.ch/lib/bbmb/util/csv_importer.rb:59:in `block in import_record'
/var/www/vetoquinol.bbmb.ch/lib/bbmb/util/csv_importer.rb:57:in `each'
/var/www/vetoquinol.bbmb.ch/lib/bbmb/util/csv_importer.rb:57:in `import_record'
/var/www/vetoquinol.bbmb.ch/lib/bbmb/util/csv_importer.rb:21:in `block in import'
/var/www/vetoquinol.bbmb.ch/lib/bbmb/util/csv_importer.rb:19:in `each'
/var/www/vetoquinol.bbmb.ch/lib/bbmb/util/csv_importer.rb:19:in `import'
/var/www/vetoquinol.bbmb.ch/vendor/bundle/ruby/2.4.0/gems/bbmb-2.2.8/lib/bbmb/util/updater.rb:24:in `import'
/var/www/vetoquinol.bbmb.ch/vendor/bundle/ruby/2.4.0/gems/bbmb-2.2.8/lib/bbmb/util/updater.rb:17:in `block in run'
/var/www/vetoquinol.bbmb.ch/vendor/bundle/ruby/2.4.0/gems/bbmb-2.2.8/lib/bbmb/util/polling_manager.rb:91:in `poll_message'
/var/www/vetoquinol.bbmb.ch/vendor/bundle/ruby/2.4.0/gems/bbmb-2.2.8/lib/bbmb/util/polling_manager.rb:86:in `block in poll_message'
/usr/local/ruby-2.4.0/lib/ruby/2.4.0/delegate.rb:341:in `each'
/usr/local/ruby-2.4.0/lib/ruby/2.4.0/delegate.rb:341:in `block in delegating_block'
/var/www/vetoquinol.bbmb.ch/vendor/bundle/ruby/2.4.0/gems/bbmb-2.2.8/lib/bbmb/util/polling_manager.rb:85:in `poll_message'
/var/www/vetoquinol.bbmb.ch/vendor/bundle/ruby/2.4.0/gems/bbmb-2.2.8/lib/bbmb/util/polling_manager.rb:71:in `block in poll'
/var/www/vetoquinol.bbmb.ch/vendor/bundle/ruby/2.4.0/gems/bbmb-2.2.8/lib/bbmb/util/polling_manager.rb:69:in `each'
/var/www/vetoquinol.bbmb.ch/vendor/bundle/ruby/2.4.0/gems/bbmb-2.2.8/lib/bbmb/util/polling_manager.rb:69:in `poll'
/var/www/vetoquinol.bbmb.ch/vendor/bundle/ruby/2.4.0/gems/bbmb-2.2.8/lib/bbmb/util/polling_manager.rb:150:in `block in poll_sources'
/var/www/vetoquinol.bbmb.ch/vendor/bundle/ruby/2.4.0/gems/bbmb-2.2.8/lib/bbmb/util/polling_manager.rb:143:in `block in load_sources'
/usr/local/ruby-2.4.0/lib/ruby/2.4.0/psych/deprecated.rb:32:in `each'
/usr/local/ruby-2.4.0/lib/ruby/2.4.0/psych/deprecated.rb:32:in `load_documents'
/var/www/vetoquinol.bbmb.ch/vendor/bundle/ruby/2.4.0/gems/bbmb-2.2.8/lib/bbmb/util/polling_manager.rb:142:in `load_sources'
/var/www/vetoquinol.bbmb.ch/vendor/bundle/ruby/2.4.0/gems/bbmb-2.2.8/lib/bbmb/util/polling_manager.rb:149:in `poll_sources'
/var/www/vetoquinol.bbmb.ch/vendor/bundle/ruby/2.4.0/gems/bbmb-2.2.8/lib/bbmb/util/updater.rb:13:in `run'
/var/www/vetoquinol.bbmb.ch/vendor/bundle/ruby/2.4.0/gems/bbmb-2.2.8/lib/bbmb/util/server.rb:41:in `update'
/var/www/vetoquinol.bbmb.ch/vendor/bundle/ruby/2.4.0/gems/bbmb-2.2.8/lib/bbmb/util/server.rb:98:in `block (2 levels) in run_updater'
/var/www/vetoquinol.bbmb.ch/vendor/bundle/ruby/2.4.0/gems/bbmb-2.2.8/lib/bbmb/util/server.rb:87:in `loop'
/var/www/vetoquinol.bbmb.ch/vendor/bundle/ruby/2.4.0/gems/bbmb-2.2.8/lib/bbmb/util/server.rb:87:in `block in run_updater'

Should be fixed with Fix encoding problem

view · edit · sidebar · attach · print · history
Page last modified on June 02, 2017, at 12:53 PM