view · edit · sidebar · attach · print · history

Index>

20150608-nil-error-split

Summary

  • Avoid undefined method `split' for nil:NilClass
  • avoid uninitialized constant OddbPrevalence::EphaInteractions
  • adapt to savon ext/swissindex to savon 2.x

Commits

Index

Keep in Mind for work to do
  • Fix dojo error http://www.sitepen.com/blog/2012/10/31/debugging-dojo-common-error-messages/#forgot-dom-ready
  • I removed on May-27 tests for ix_registrationss, fix_sequences, fix_compositions, fix_packages from test/test_plugin/swissmedic.rb,as he could not find any references for them in the src code. Did I erroneously remove stuff when cleaning up the swissmedic import earlier?
  • The whole test for older/newer Packages must be adapted to xlsx. One must compare the rows (e.g. by creating csv files) and do the same stuff in xlsx!
  • creat gem: task: input=file with ean-codes, standard output show ean-codes + atc-code. Source is Swissmedic Packungen.xlsx or XML.
  • Import via data/medreg_companies.yaml
  • Fix problem with radioactivatum 99m-technetio when parsing Wirkstoffe
  • Fix galenic_forms when parsing swissmedic.xlsx
  • Cleanup generic_type. Replace it everywhere by sl_generic_type and adapt code accordingly.
  • Get updated ATC-codes from EPha for oddb.org, too.
  • Display new fields (LABEL, MORE_INFO, CORRESP) for compositions in oddb.org.
  • Use refdatabase for oddb.org, too.

adapt to savon ext/swissindex to savon 2.x

Forgot to update to savon 1.6 in ext/swissindex/src/swissindex.rb. Unit-Test on travis-ci show this problem.

Updated the code. Skipping two unit-tests as we will have to rework this soon when switching to refdata. This might be a probleme, as we no longer can search by pharmacode. Instead we will have to use GTIN (aka EAN13) everywhere.

Avoid undefined method `split' for nil:NilClass

Got the following error when running impor_daily


Plugin: ODDB::SwissmedicPlugin
Error: NoMethodError
Message: undefined method `split' for nil:NilClass
Backtrace:
/var/www/oddb.org/src/plugin/swissmedic.rb:811:in `update_sequence'
/var/www/oddb.org/src/plugin/swissmedic.rb:782:in `block in
update_registrations'
/var/www/oddb.org/src/plugin/swissmedic.rb:777:in `each'
/var/www/oddb.org/src/plugin/swissmedic.rb:777:in `update_registrations'
/var/www/oddb.org/src/plugin/swissmedic.rb:82:in `update'
/var/www/oddb.org/src/util/updater.rb:443:in `block in update_swissmedic'
/var/www/oddb.org/src/util/updater.rb:548:in `call'
/var/www/oddb.org/src/util/updater.rb:548:in `wrap_update'
/var/www/oddb.org/src/util/updater.rb:441:in `update_swissmedic'
/var/www/oddb.org/src/util/updater.rb:200: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>'

After fixing the problem with epha-interactions running import_daily (having removed old epha_interactions.csv) on oddb-ci2. Waiting for import to finish. Error is still present. Changed source to go into pry and restarting import again.

Reason is that two rows of the new Packungen.xlsx file have an empty column C Präparatebezeichung. E.g 15724 2 Future Health Pharma GmbH 04.05.0. A09AA02 Synthetika human 01.11.51 22.03.94 12.11.18 001 60 Dragée(s) D pancreatis pulvis, aspergilli oryzae enzymata pancreatis pulvis corresp. lipasum 7400 U. Ph. Eur. et proteasum 420 U. Ph. Eur. et amylasum 7000 U. Ph. Eur., aspergilli oryzae enzymata corresp. proteasum 10 U. FIP et amylasum 170 U. FIP et cellulasum (1974) 70 U. FIP, excipiens pro compresso obducto. Digestivum

Working around the problem. Will log the errors.

Remarked that swissmedic-diff has also changed the header lines of Packungen.xlsx. Therefore pushed commit Swissmedic has different header lines. Waiting for Zeno to publish version 0.1.9 before being able to push my fix to oddb.org.

Fixed the problem, but must avoid next nil access. Rerunning the import now I got a segmentation fault (but way after updating the row in question). Restarting import again. Found the following lines in log/oddb/debug/2015/06.log

2015-06-08 14:18:05 +0200: /var/www/oddb.org/src/plugin/swissmedic.rb: 818: skip because of empty column C
2015-06-08 14:22:22 +0200: /var/www/oddb.org/src/plugin/swissmedic.rb: 818: skip because of empty column C

avoid uninitialized constant OddbPrevalence::EphaInteractions

On June 4 got the following error when running import_daily

Plugin: ODDB::EphaInteractionPlugin
Error: NameError
Message: uninitialized constant OddbPrevalence::EphaInteractions
Backtrace:
/var/www/oddb.org/src/util/oddbapp.rb:525:in `delete_all_epha_interactions'
/var/www/oddb.org/src/plugin/epha_interactions.rb:45:in `update'
/var/www/oddb.org/src/util/updater.rb:378:in `block in update_epha_interactions'
/var/www/oddb.org/src/util/updater.rb:548:in `call'
/var/www/oddb.org/src/util/updater.rb:548:in `wrap_update'
/var/www/oddb.org/src/util/updater.rb:376:in `update_epha_interactions'
/var/www/oddb.org/src/util/updater.rb:190: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>'

Fixed with commits:

view · edit · sidebar · attach · print · history
Page last modified on June 08, 2015, at 05:44 PM