view · edit · sidebar · attach · print · history

Index>

20160222-utf-8-import-daily

Summary

  • Fix UTF-8 error in import-daily
  • Patinfo-update should parse again only newest PIs

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.
  • Use refdatabase for oddb.org, too.
  • Check whether we should revert the part which touche src/plugin/text_info.rb of commit 17af82ba4d76a5838683411b260de265531f9e74. We should improve test/stub/oddbapp.rb to work similar for update/pointer as the real oddbapp. In this case we would have a good Stub for plugins. May we need a different stub when working with plugins (which create/modify/destroy ODDB-Objects), when in most other cases a very simple stub is sufficient.
  • When a logged in admin user changes an atc_code of a product, the corresponding atc_class must update its sequences, too.
  • Order of entering search type and value should not matter. Both should show long URL with search
  • Remove parser for minifi (but keep the minifi)

Fix UTF-8 error in import-daily

Must fix the following error

Plugin: ODDB::TextInfoPlugin
Error: ArgumentError
Message: invalid byte sequence in US-ASCII
Backtrace:
/var/www/oddb.org/src/plugin/text_info.rb:1218:in `match'
/var/www/oddb.org/src/plugin/text_info.rb:1218:in `extract_html'
/var/www/oddb.org/src/plugin/text_info.rb:1256:in `parse_patinfo'
/var/www/oddb.org/src/plugin/text_info.rb:1417:in `block in import_swissmedicinfo'
/var/www/oddb.org/src/plugin/text_info.rb:1412:in `each'
/var/www/oddb.org/src/plugin/text_info.rb:1412:in `import_swissmedicinfo'
/var/www/oddb.org/src/util/updater.rb:573:in `block in update_notify_simple'
/var/www/oddb.org/src/util/updater.rb:549:in `call'
/var/www/oddb.org/src/util/updater.rb:549:in `wrap_update'
/var/www/oddb.org/src/util/updater.rb:567:in `update_notify_simple'
/var/www/oddb.org/src/util/updater.rb:344:in `update_textinfo_swissmedicinfo'
/var/www/oddb.org/src/util/updater.rb:198: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>'

Checking whether all environment variables are the same whether we start import_daily from the command line (where we don't have an error) and via crontab.

I think I found the culprint. When starting via crontab neither LANG nor LANGUAGE is set_to "de_CH.UTF-8". I will set these defaults.

First fix does not work correctly. Why? There is another occurrence where we used IO.read without forcing UTF-8 encoding. Fixing it, too.

Pushed commit Setting defaults for LANG and LANGUAGE to de_CH.UTF-8. Pulled it on thinpower.

Patinfo-update should parse again only newest PIs

Must fix the error introduced the last week.

view · edit · sidebar · attach · print · history
Page last modified on February 23, 2016, at 10:24 AM