Got the following error mail
Plugin: ODDB::BsvXmlPlugin Error: NoMethodError Message: undefined method `+' for nil:NilClass @report: {:name_base=>"Myozyme", :name_descr=>"Trockensub 50 mg ", :swissmedic_no5_bag=>"58038", :deductible=>:deductible_g, :generic_type=>:unknown, :swissmedic_no5_oddb=>"58038", :swissmedic_no8_bag=>"58038001"} Backtrace: /var/www/oddb.org/src/plugin/bsv_xml.rb:347:in `block in tag_end' /var/www/oddb.org/src/plugin/bsv_xml.rb:344:in `each' /var/www/oddb.org/src/plugin/bsv_xml.rb:344:in `tag_end' /usr/local/lib/ruby/1.9.1/rexml/parsers/streamparser.rb:26:in `parse' /usr/local/lib/ruby/1.9.1/rexml/document.rb:205:in `parse_stream' /var/www/oddb.org/src/plugin/bsv_xml.rb:915:in `update_preparations' /var/www/oddb.org/src/plugin/bsv_xml.rb:601:in `block (2 levels) in _update' /usr/local/lib/ruby/gems/1.9.1/gems/rubyzip-1.1.6/lib/zip/entry.rb:500:in `get_input_stream' /var/www/oddb.org/src/plugin/bsv_xml.rb:601:in `block in _update' /usr/local/lib/ruby/gems/1.9.1/gems/rubyzip-1.1.6/lib/zip/entry_set.rb:42:in `call' /usr/local/lib/ruby/gems/1.9.1/gems/rubyzip-1.1.6/lib/zip/entry_set.rb:42:in `block in each' /usr/local/lib/ruby/gems/1.9.1/gems/rubyzip-1.1.6/lib/zip/entry_set.rb:41:in `each' /usr/local/lib/ruby/gems/1.9.1/gems/rubyzip-1.1.6/lib/zip/entry_set.rb:41:in `each' /usr/local/lib/ruby/gems/1.9.1/gems/rubyzip-1.1.6/lib/zip/central_directory.rb:182:in `each' /usr/local/lib/ruby/gems/1.9.1/gems/rubyzip-1.1.6/lib/zip/file.rb:139:in `block in foreach' /usr/local/lib/ruby/gems/1.9.1/gems/rubyzip-1.1.6/lib/zip/file.rb:99:in `open' /usr/local/lib/ruby/gems/1.9.1/gems/rubyzip-1.1.6/lib/zip/file.rb:138:in `foreach' /var/www/oddb.org/src/plugin/bsv_xml.rb:596:in `_update' /var/www/oddb.org/src/plugin/bsv_xml.rb:591:in `update' /var/www/oddb.org/src/util/updater.rb:284:in `block in update_bsv' /var/www/oddb.org/src/util/updater.rb:536:in `call' /var/www/oddb.org/src/util/updater.rb:536:in `wrap_update' /var/www/oddb.org/src/util/updater.rb:282:in `update_bsv' /var/www/oddb.org/src/util/updater.rb:205:in `run' jobs/import_daily:13:in `block in <module:Util>' /var/www/oddb.org/src/util/job.rb:40:in `call' /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>'
Found the problem. Easy to fix. But I think I must wait a long time to see, whether my change is okay, as it took almost 2 hours and a half till the problem got reported as shown in the log with the lines
2016-04-01 07:37:45 CEST bsv_xml: save_file = /var/www/oddb.org/data/xml/XMLPublications-2016.04.01.zip 2016-04-01 07:37:45 CEST bsv_xml: latest_file = /var/www/oddb.org/data/xml/XMLPublications-latest.zip <..> 2016-04-01 07:40:25 CEST bsv_xml: entry.name = Preparations.xml 2016-04-01 10:00:13 CESTlog notify Error: SL-Update (XML): start outgoing process ["log"]. Must attach 0 files and 0 parts. 2016-04-01 10:00:13 CESTUtil.send_mail list_and_recipients ["log"] 2016-04-01 10:00:13 CEST Util.log_and_deliver_mail to=["ngiger@ywesee.com", "zdavatz@ywesee.com"] subject ch.ODDB.org Report - Error: SL-Update (XML) - 04/2016 size 2284 with 0 attachments. Plugin: ODDB::BsvX
On oddb-ci2 got another error after a few minutes
Message: undefined method `active?' for #<Array:0x00000012270580> Backtrace: /usr/local/lib64/ruby/gems/1.9.1/gems/odba-1.1.0/lib/odba/stub.rb:112:in `method_missing' /var/www/oddb.org/src/model/package.rb:442:in `public?' /usr/local/lib64/ruby/gems/1.9.1/gems/odba-1.1.0/lib/odba/stub.rb:112:in `method_missing' /var/www/oddb.org/src/plugin/bsv_xml.rb:152:in `block in initialize' /var/www/oddb.org/src/model/sequence.rb:183:in `each' /var/www/oddb.org/src/model/sequence.rb:183:in `each_package' /usr/local/lib64/ruby/gems/1.9.1/gems/odba-1.1.0/lib/odba/stub.rb:112:in `method_missing' /var/www/oddb.org/src/model/registration.rb:155:in `block in each_package' /var/www/oddb.org/src/model/registration.rb:154:in `each_value' /var/www/oddb.org/src/model/registration.rb:154:in `each_package' /usr/local/lib64/ruby/gems/1.9.1/gems/odba-1.1.0/lib/odba/stub.rb:112:in `method_missing' /var/www/oddb.org/src/util/oddbapp.rb:713:in `block in each_package' /usr/local/lib64/ruby/gems/1.9.1/gems/odba-1.1.0/lib/odba/stub.rb:112:in `each_value' /usr/local/lib64/ruby/gems/1.9.1/gems/odba-1.1.0/lib/odba/stub.rb:112:in `method_missing' /var/www/oddb.org/src/util/oddbapp.rb:712:in `each_package' /var/www/oddb.org/src/plugin/bsv_xml.rb:151:in `initialize' /var/www/oddb.org/src/plugin/bsv_xml.rb:914:in `new' /var/www/oddb.org/src/plugin/bsv_xml.rb:914:in `update_preparations' /var/www/oddb.org/src/plugin/bsv_xml.rb:602:in `block (2 levels) in _update' /var/www/.gem/ruby/1.9.1/gems/rubyzip-1.1.7/lib/zip/entry.rb:502:in `get_input_stream' /var/www/oddb.org/src/plugin/bsv_xml.rb:602:in `block in _update' /var/www/.gem/ruby/1.9.1/gems/rubyzip-1.1.7/lib/zip/entry_set.rb:42:in `call' /var/www/.gem/ruby/1.9.1/gems/rubyzip-1.1.7/lib/zip/entry_set.rb:42:in `block in each' /var/www/.gem/ruby/1.9.1/gems/rubyzip-1.1.7/lib/zip/entry_set.rb:41:in `each' /var/www/.gem/ruby/1.9.1/gems/rubyzip-1.1.7/lib/zip/entry_set.rb:41:in `each' /var/www/.gem/ruby/1.9.1/gems/rubyzip-1.1.7/lib/zip/central_directory.rb:182:in `each' /var/www/.gem/ruby/1.9.1/gems/rubyzip-1.1.7/lib/zip/file.rb:146:in `block in foreach' /var/www/.gem/ruby/1.9.1/gems/rubyzip-1.1.7/lib/zip/file.rb:99:in `open' /var/www/.gem/ruby/1.9.1/gems/rubyzip-1.1.7/lib/zip/file.rb:145: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:284:in `block in update_bsv' /var/www/oddb.org/src/util/updater.rb:536:in `call' /var/www/oddb.org/src/util/updater.rb:536:in `wrap_update' /var/www/oddb.org/src/util/updater.rb:282:in `update_bsv'
Looking at it, too.
Fixed with commit Avoid nil in update_bsv
Pulled patches to thinpower. Moved XMLPublications from march to XMLPublications-latest. Started jobs/import_bsv in screen import_daily.
Fixed some errors in unit-test. See commit Fix unit test errors
First adding version of oddb2xml which generated the XML files in the attribute GENERATED_BY.
Adding a spec test to catch the failure. Done. Must correct *.xsd files and change various spec tests to handle the change nbr_records.
Fixed with commits:
Must change the text in for the legend of evidentia from "Rot = Original" -> "Blau = Original" to match the color of their CSS.
Fixed with Fix explain color for evidentia
After running the last import this package is not correct, as shown by these bin/admin lines
ch.oddb> registration('55828').sequence('03').packages -> {"888"=>#<ODBA::Stub:56180680#29541067 @odba_class=ODDB::Package @odba_container=56046800#29552080>} ch.oddb> registration('55828').sequence('03').package('888') -> #<ODDB::Package:0x00000006b343f8> ch.oddb> registration('55828').sequence('03').package('888').sequence -> ch.oddb> registration('55828').sequence('03').package('888').sequence.class -> NilClass ch.oddb> registration('55828').sequence('03').package('888').registration.class -> NilClass
Checking whether my fix works. But I must wait a long time till I run into the my pry debug statement. Fix did not work as expected. Found and tested a work-around with pry. Reimporting DB to test.
Pushed commit Fix checking packages