<< Masa.20111205-debug-pointer-link-update_price_feeds-odba-data-corruption-oddb_org | 2011 | Masa.20111201-debug-export_oddbdat-mail_patinfo_invoices-ruby193-oddb_org >>
Refer to http://dev.ywesee.com/wiki.php/Choddb/Ruby193p0#invoicers_20111202
Refer to http://dev.ywesee.com/wiki.php/Choddb/MiGelChangelog#update_migel_20111202
Error (update_price_feeds)
/usr/lib64/ruby/site_ruby/1.8/odba/stub.rb:112:in `send': undefined method `limitation_text' for #<ODDB::Text::Chapter:0x7f62e6298f10> (NoMethodError) from /usr/lib64/ruby/site_ruby/1.8/odba/stub.rb:112:in `method_missing' from /var/www/oddb.org/src/model/package.rb:238:in `limitation_text' from /usr/lib64/ruby/site_ruby/1.8/odba/stub.rb:112:in `send' from /usr/lib64/ruby/site_ruby/1.8/odba/stub.rb:112:in `method_missing' from /var/www/oddb.org/src/view/drugs/package.rb:117:in `init' from /usr/lib64/ruby/site_ruby/1.8/htmlgrid/component.rb:138:in `initialize' from /usr/lib64/ruby/site_ruby/1.8/htmlgrid/composite.rb:59:in `new' from /usr/lib64/ruby/site_ruby/1.8/htmlgrid/composite.rb:59:in `create' ... 26 levels... from /var/www/oddb.org/src/util/job.rb:17:in `call' from /var/www/oddb.org/src/util/job.rb:17:in `run' from jobs/import_bsv_followers:12 from ODDB::View::Rss::PackageTemplate::COMPONENTS[[0, 0]] in create(ODDB::View::Drugs::PackageInnerComposite)
Dump database on server
$ pg_dump -U postgres oddb_dot_org > oddb.org.bak.20111202.sql $ gzip oddb.org.bak.20111202.sql
Restore database locally
$ zcat oddb.org.bak.20111202.sql.gz | psql -U postgres oddb.org
Run
masa@masa ~/ywesee/oddb.org $ bin/admin ch.oddb> Updater.new(self).update_price_feeds -> undefined method `limitation_text' for #<ODDB::Text::Chapter:0x7febe678fa80>
Debug print (to detect the specific error data)
module ODDB class RssPlugin < Plugin def update_price_feeds(month=@@today) ...print "news.length = "
p news.length
update_rss_feeds('sl_introduction.rss', sort_packages(news), View::Rss::SlIntroduction) # update_rss_feeds('price_cut.rss', sort_packages(cuts), View::Rss::PriceCut) # update_rss_feeds('price_rise.rss', sort_packages(rises), View::Rss::PriceRise) end
Result
news.length = 32
class Package < HtmlGrid::Component include View::Latin1 def to_html(context) ... feed.encoding = 'UTF-8' feed.xml_stylesheets.new_xml_stylesheet.href = @lookandfeel.resource(:css) language = @session.language @model.each { |package|print "package.odba_id = "
p package.odba_id
Result
...
package.odba_id = 27652786
package.odba_id = 27274996
package.odba_id = 27275008
package.odba_id = 26567955
<= this is the error package data
failsafe rescued NoMethodError < StandardError
undefined method `limitation_text' for #<ODDB::Text::Chapter:0x7f2bd46018d0>
Check package data
ch.oddb> ODBA.cache.fetch('26567955').iksnr -> 61289 ch.oddb> ODBA.cache.fetch('26567955').seqnr -> 02 ch.oddb> ODBA.cache.fetch('26567955').ikscd -> 028 ch.oddb> ODBA.cache.fetch('26567955').instance_variable_get('@sl_entry').instance_variable_get('@limitation_text').class
Problem
Error
error in SBSM::Session#process: /de/gcc NoMethodError undefined method `resolve' for #<SBSM::InvalidDataError: e_invalid_pointer> /home/masa/ywesee/oddb.org/src/state/admin/sequence.rb:133:in `new_package' /usr/lib64/ruby/site_ruby/1.8/sbsm/state.rb:222:in `send' /usr/lib64/ruby/site_ruby/1.8/sbsm/state.rb:222:in `_trigger' /home/masa/ywesee/oddb.org/src/state/global.rb:836:in `_trigger' /usr/lib64/ruby/site_ruby/1.8/sbsm/state.rb:211:in `trigger'
Commit