view · edit · sidebar · attach · print · history

20120210-fix-quanty-error-pointer-url-bsv-errors-oddb_org-french-fi-ebook

<< Masa.20120213-interaction_view-oddb_org | Index | Masa.20120131-fix-errors-oddb_org-recycled-object-error-migel-check-grid_c >>


  1. Fix quanty error oddb.org
  2. Fix pointer url in lppv report email
  3. Skip French Fi ebook
  4. Fix update_bsv IO error and diff oddb.org
  5. Fix pointer for nil class
  6. Fix ddd_price error

Commits
  1. Fix dose unit error. RuntimeError not same unit mg != TU (oddb.org)
  2. Fix pointer url in lppv report email (oddb.org)
  3. Skip an error of missing fr data (ebps)
  4. Removed puts statement and added logging miss-updating packages in swissindex.rb (oddb.org)
  5. Fix Persistence#issue_update to run when an object is not nil and the object has diff method (oddb.org)
  6. Added saving log of attached files in doc/sl_errors/year/month directory (oddb.org)
  7. Rescued UninitializedPathError in src/util/persistence.rb#issue_create method (oddb.org)
  8. Updated URL to link to Markenname search (ebps)
  9. Skip Message: undefined method pointer for nil when update_bsv updates sl_entry data (oddb.org)

Fix quanty error oddb.org

Refer to http://dev.ywesee.com/uploads/$PageName//ch.oddb_crash_8.2.2012_13.25.txt

Commit

Fix pointer url in lppv report email

Refer to Fwd: ch.ODDB.org Report - Lppv prices - 02/2012

Downloaded Prices: 608
Updated Packages: 17

Packages with SL-Entry: 3

The following Packages experienced a Price RAISE:
IKS-Number            Old Price             New Price            Package Name
http://ch.oddb.org/de/gcc/resolve/pointer/%3A%21registration%2C32747%21sequence%2C01%21package%2C043.
32747                 62.60                 62.65
Contractubex, Gel
...

Commit

Skip French Fi ebook

Refer to Ebook meddrugs_fr_ch_kindle.mobi could not be completed (07.02.2012 15:42:25)

NoMethodError: undefined method `metadata' for nil:NilClass

Probably 'fr' data is missing in the following data:
[["oid", 28459077], ["article_codes", [{:article_ean13=>"7680510780550", :article_pcode=>"2841034", :article_size=>"10 x 1 ml", :article_dose=>"10 mg/ml"}, {:article_ean13=>"7680510780635", :article_size=>"5 x 5 ml", :article_dose=>"50mg / 5ml"}]]]

/usr/lib64/ruby19/site_ruby/1.9.1/ebps/conversion/fachinfo_yaml.rb:9:in `block in <module:EBPS>'
/usr/lib64/ruby19/1.9.1/yaml.rb:217:in `call'
/usr/lib64/ruby19/1.9.1/yaml.rb:217:in `transfer'

Commit

git pull

 /usr/local/share/src/ebps $ git pull
 /usr/local/share/src/ebps $ sudo -u hwyss git pull

run

 /var/ebps/bin $ sudo -u hwyss ./meddrugs.ch_fr_kindle

Fix update_bsv IO error and diff oddb.org

Refer to

Plugin: ODDB::BsvXmlPlugin
Error: Errno::EIO
Message: Input/output error - <STDOUT>
@report: {:name_base=>"Agrippal", :name_descr=>"Inj Susp ",
:swissmedic_no5_bag=>"59267", :deductible=>:deductible_g,
:generic_type=>:unknown, :atc_class=>"J07BB02",
:pharmacode_bag=>"4439980"}
Backtrace:
(druby://localhost:50001)
/var/www/oddb.org/ext/swissindex/src/swissindex.rb:285:in `write'
(druby://localhost:50001)
/var/www/oddb.org/ext/swissindex/src/swissindex.rb:285:in `puts'
Plugin: ODDB::BsvXmlPlugin
Error: NoMethodError
Message: undefined method `diff' for
#<ODDB::Persistence::UninitializedPathError:0x00000005d4ef18>
@report: {:name_base=>"Amoxi Mepha", :name_descr=>"Gran 100 mg/4ml f
Susp", :swissmedic_no5_bag=>"49929", :deductible=>:deductible_g,
:generic_type=>:generic, :atc_class=>"J01CA04",
:pharmacode_bag=>"2504360", :swissmedic_no5_oddb=>"49929",
:swissmedic_no8_bag=>"49929048", :pharmacode_oddb=>"2504360"}
Backtrace:
/var/www/oddb.org/src/util/persistence.rb:234:in `issue_update'
/var/www/oddb.org/src/util/oddbapp.rb:121:in `block in update'

Strategy

  • logging error data and rescuing(skip) the data
  • saving attached files

Note

  • The IO error comes probably because of the permission problem, not because of swissindex server.
    • 'puts' is the problem
  • oddbd and swissindex_pharmad should run with the same user

Commits

Fix pointer for nil class

Plugin: ODDB::BsvXmlPlugin
Error: NoMethodError
Message: undefined method `pointer' for nil:NilClass
@report: {:name_base=>"Amoxi Mepha", :name_descr=>"Gran 200 mg/4ml f Susp", :swissmedic_no5_bag=>"49929", :deductible=>:deductible_o, :generic_type=>:generic, :atc_class=>"J01CA04", :pharmacode_bag=>"2504348", :swissmedic_no5_oddb=>"49929", :swissmedic_no8_bag=>"49929021", :pharmacode_oddb=>"2504348"}
Backtrace:
/usr/local/lib/ruby/gems/1.9.1/gems/odba-1.0.8/lib/odba/stub.rb:113:in `method_missing'
/home/masa/ywesee/oddb.org/src/plugin/bsv_xml.rb:391:in `block in tag_end'
/home/masa/ywesee/oddb.org/src/plugin/bsv_xml.rb:389:in `each'
/home/masa/ywesee/oddb.org/src/plugin/bsv_xml.rb:389:in `tag_end'

Console

failsafe rescued ODDB::Persistence::UninitializedPathError < StandardError
:!registration,49929!sequence,04!021!sl_entry. -> ODDB::Sequence::package(021) returned nil
/home/masa/ywesee/oddb.org/src/util/persistence.rb:259:in `block in resolve'
/home/masa/ywesee/oddb.org/src/util/persistence.rb:254:in `each'
/home/masa/ywesee/oddb.org/src/util/persistence.rb:254:in `resolve'
...
ODBA::Stub was unable to replace ODDB::SlEntry#708184 from ODDB::Package:#217293

Experiment

ch.oddb> ODBA.cache.fetch('217293')
-> #<ODDB::Package:0x00000007a29a98>
ch.oddb> ODBA.cache.fetch('217293').pointer
-> :!registration,49929!sequence,04!package,021.
ch.oddb> ODBA.cache.fetch('217293').pointer.resolve(self)
-> #<ODDB::Package:0x00000007b9eb08>
ch.oddb> ODBA.cache.fetch('217293').sequence.packages.length
-> 0
ch.oddb> ODBA.cache.fetch('217293').iksnr
-> 49929
ch.oddb> ODBA.cache.fetch('217293').seqnr
-> 04
ch.oddb> ODBA.cache.fetch('217293').ikscd
-> 021

ch.oddb> ODBA.cache.fetch('217293').sl_entry.class
-> ODDB::SlEntry
ch.oddb> ODBA.cache.fetch('217293').sl_entry.pointer
-> undefined method `pointer' for nil:NilClass

Note

  • It looks strange
  • ODBA.cache.fetch works but there is no package in the sequence

Experiment

 ch.oddb> delete(ODBA.cache.fetch('217293').pointer)
 -> can't dup NilClass
 ch.oddb> ODBA.cache.fetch('217293').pointer
 -> Unknown odba_id 217293

 ch.oddb> registration('49929').sequence('04').pointer + [:package, '021']
 -> :!registration,49929!sequence,04!package,021.
 ch.oddb> (registration('49929').sequence('04').pointer + [:package, '021']).resolve(self)
 -> 
 ch.oddb> (registration('49929').sequence('04').pointer + [:package, '021']).resolve(self).class
 -> NilClass

Run

 jobs/import_bsv

Catch the UninitializedPathError

Result

Fix ddd_price error

Refer to http://dev.ywesee.com/uploads/$PageName//ch.oddb_crash_8.2.2012_13.25.txt

error in SBSM::Session#to_html: /de/mymedi/ddd_price/reg/15219/seq/03/pack/076/search_query/A01A/search_type/st_sequence
NoMethodError
undefined method `value' for "k.A.":String
/home/masa/ywesee/oddb.org/src/view/drugs/ddd_price.rb:81:in `price_public'
/usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.4/lib/htmlgrid/composite.rb:67:in `create'
/usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.4/lib/htmlgrid/composite.rb:285:in `compose_component'
/usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.4/lib/htmlgrid/composite.rb:210:in `block in compose'
/usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.4/lib/htmlgrid/composite.rb:204:in `each'
/usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.4/lib/htmlgrid/composite.rb:204:in `compose'
...
view · edit · sidebar · attach · print · history
Page last modified on February 14, 2012, at 04:40 PM