view · edit · sidebar · attach · print · history

20130826-mail-receivers

<< | Index | >>


Summary

  • Why do the report mail don't get delivered to more than 3 receivers
  • fix error with doctors.csv and index_therapeuticus.csv

Commits

Index


some table should have fixed-font

(See also my blog from August 11) bad table in http://ch.oddb.org/de/gcc/fachinfo/swissmedicnr/49456 (ClexaneŽ/- multi)

The problem are (after analysing the HTML) that

  • the HTML has styles for
    • adding border at the top or at the bottom of the table row
    • uses Courier as fixed character sets to align the content of table rows
    • a sequence of one or more '&bsp'is replaces by the same number of spaces in the yaml. But HTML replaces them as single space when displayed via htmlgrid (which is desirable in many cases!).

Zeno remarked that in http://ch.oddb.org/de/gcc/fachinfo/swissmedicnr/55585 (Pegasys) there is a table in grey. It seems that this stems from the fact, that the table has the attribute border="0" and is considered "preformatted". E.g. see snippet in ext/fiparse/textinfo_hpicot.rb

if elem.attributes['border'] == '0'
      # if 'rowSepBelow' class is found,
      # then this elem must be handled as pre-format style paragraph

fix error with doctors.csv and index_therapeuticus.csv

In the logs we see the following error:

Plugin: ODDB::CsvExportPlugin
Error: ArgumentError
Message: invalid byte sequence in US-ASCII
Backtrace:
(druby://localhost:10005) /usr/local/lib/ruby/1.9.1/csv.rb:2071:in `=~'
(druby://localhost:10005) /usr/local/lib/ruby/1.9.1/csv.rb:2071:in
`init_separators'
(druby://localhost:10005) /usr/local/lib/ruby/1.9.1/csv.rb:1603:in `initialize'
(druby://localhost:10005) /usr/local/lib/ruby/1.9.1/csv.rb:1362:in `new'
(druby://localhost:10005) /usr/local/lib/ruby/1.9.1/csv.rb:1362:in `open'
(druby://localhost:10005)
/var/www/oddb.org/ext/export/src/csv_exporter.rb:98:in `dump'
(druby://localhost:10005)
/var/www/oddb.org/ext/export/src/odba_exporter.rb:149:in `block (2
levels) in export_idx_th_csv'
(druby://localhost:10005)
/var/www/oddb.org/ext/export/src/odba_exporter.rb:147:in `each'
(druby://localhost:10005)
/var/www/oddb.org/ext/export/src/odba_exporter.rb:147:in `block in
export_idx_th_csv'
(druby://localhost:10005)
/var/www/oddb.org/ext/export/src/odba_exporter.rb:286:in `call'
(druby://localhost:10005)
/var/www/oddb.org/ext/export/src/odba_exporter.rb:286:in `block in
safe_export'
(druby://localhost:10005) /usr/local/lib/ruby/1.9.1/tempfile.rb:316:in `open'
(druby://localhost:10005)
/var/www/oddb.org/ext/export/src/odba_exporter.rb:285:in `safe_export'
(druby://localhost:10005)
/var/www/oddb.org/ext/export/src/odba_exporter.rb:143:in
`export_idx_th_csv'
(druby://localhost:10005) /usr/local/lib/ruby/1.9.1/drb/drb.rb:1548:in
`perform_without_block'
(druby://localhost:10005) /usr/local/lib/ruby/1.9.1/drb/drb.rb:1508:in `perform'
(druby://localhost:10005) /usr/local/lib/ruby/1.9.1/drb/drb.rb:1586:in
`block (2 levels) in main_loop'
(druby://localhost:10005) /usr/local/lib/ruby/1.9.1/drb/drb.rb:1582:in `loop'
(druby://localhost:10005) /usr/local/lib/ruby/1.9.1/drb/drb.rb:1582:in
`block in main_loop'
/var/www/oddb.org/src/plugin/csv_export.rb:160:in `export_index_therapeuticus'
/var/www/oddb.org/src/util/updater.rb:80:in `block in
export_index_therapeuticus_csv'
/var/www/oddb.org/src/util/updater.rb:488:in `call'
/var/www/oddb.org/src/util/updater.rb:488:in `wrap_update'
/var/www/oddb.org/src/util/updater.rb:78:in `export_index_therapeuticus_csv'
/var/www/oddb.org/jobs/mail_index_therapeuticus_csv: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'
/var/www/oddb.org/jobs/mail_index_therapeuticus_csv:12:in `<module:Util>'
/var/www/oddb.org/jobs/mail_index_therapeuticus_csv:11:in `<module:ODDB>'
/var/www/oddb.org/jobs/mail_index_therapeuticus_csv:10:in `<main>'

I cannot reproduce this error on my VM. My VM runs ruby 1.9.3p429 (2013-05-15 revision 40747) [x86_64-linux], whereas thinpower runs ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-linux].

Could not install an old Ruby 1.9.3 package on my VM (sudo emerge -p "=dev-lang/ruby-1.9.3p0", got emerge: there are no ebuilds to satisfy "=dev-lang/ruby-1.9.3p0".)

We have exactly the same csv.rb on thinpower and my VM. Problem must be elsewhere.

Tried to execut on thinpower as root gem1.9 install bundler. But got error ERROR: Error installing bundler: bundler requires RubyGems version >= 1.3.6. gem1.9 ist version 1.3.1.

Trying to install the required gems under rvm and ruby-1.9.3-p0 got me frustrated again, as it simply fails with a lot of errors resolved when setting up vagrant for oddb.org on my VM. The version for funtoo on thinpower is just a lot older then on my vm and I would have had to install and freeeze a specific version of funtoo/ruby, etc.

Got the following error

ruby /var/www/oddb.org/jobs/mail_index_therapeuticus_csv 
/home/vagrant/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:51:in `require': cannot load such file -- rclconf (LoadError)
        from /home/vagrant/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:51:in `require'
        from /var/www/oddb.org/src/config.rb:7:in `<top (required)>'
        from /home/vagrant/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:51:in `require'
        from /home/vagrant/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:51:in `require'
        from /var/www/oddb.org/src/util/job.rb:3:in `<top (required)>'
        from /home/vagrant/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:51:in `require'
        from /home/vagrant/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:51:in `require'
        from /var/www/oddb.org/jobs/mail_index_therapeuticus_csv:7:in `<main>'

Why do the report mail don't get delivered to more than 3 receivers

I had (according to the usual rules) an activated testenvironment1.rb in my /var/oddb.org/etc/oddb.yml. After changing the line to # testenvironment1: /var/www/oddb.org/test/testenvironment1.rb the e-mails did not get sent to the receivers specified via mail_to: [ "'ngiger@ywesee.com','niklaus.giger@member.fsf.org','niklaus.giger@hispeed.ch','niklaus.giger@swissonline.ch'" ] but to the (seemingly hard coded) values <zdavatz@ywesee.com> and :<yasaka@ywesee.com>.

Now the question is. Where do these values come from?

src/util/log.rb sends the emails to the fix coded values @recipients = (@recipients + self::class::MAIL_TO).uniq , which are set to MAIL_TO = ['zdavatz@ywesee.com','yasaka@ywesee.com',].

Fixed the problem with the following commit Sending logs must respect mail_to from etc/oddb.yml

Updated vagrant-ngiger to create correct etc/oddb.yaml and migel.yml. See commits Removed unused template. Use testenvironments and Create etc/oddb.yml and migel.yml via templates

view · edit · sidebar · attach · print · history
Page last modified on August 26, 2013, at 05:32 PM