The following error could be easily reproduced here.
Error: ArgumentError Message: comparison of ODBA::Stub with ODBA::Stub failed Backtrace: (druby://localhost:10005) /usr/local/lib/ruby/gems/1.9.1/gems/odba-1.1.0/lib/odba/stub.rb:112:in `sort' (druby://localhost:10005) /usr/local/lib/ruby/gems/1.9.1/gems/odba-1.1.0/lib/odba/stub.rb:112:in `method_missing' (druby://localhost:10005) /var/www/oddb.org/src/model/sequence.rb:186:in `factored_compositions' (druby://localhost:10005) /var/www/oddb.org/src/model/sequence.rb:124:in `comparables' (druby://localhost:10005) /var/www/oddb.org/src/model/package.rb:213:in `comparables' (druby://localhost:10005) /usr/local/lib/ruby/gems/1.9.1/gems/odba-1.1.0/lib/odba/stub.rb:112:in `method_missing' (druby://localhost:10005) /var/www/oddb.org/ext/export/src/generics_xls.rb:96:in `block in export_generics' (druby://localhost:10005) /var/www/oddb.org/src/model/sequence.rb:183:in `each' (druby://localhost:10005) /var/www/oddb.org/src/model/sequence.rb:183:in `each_package' (druby://localhost:10005) /usr/local/lib/ruby/gems/1.9.1/gems/odba-1.1.0/lib/odba/stub.rb:112:in `method_missing' (druby://localhost:10005) /var/www/oddb.org/src/model/registration.rb:155:in `block in each_package' (druby://localhost:10005) /var/www/oddb.org/src/model/registration.rb:154:in `each_value' (druby://localhost:10005) /var/www/oddb.org/src/model/registration.rb:154:in `each_package' (druby://localhost:10005) /usr/local/lib/ruby/gems/1.9.1/gems/odba-1.1.0/lib/odba/stub.rb:112:in `method_missing' (druby://localhost:10005) /var/www/oddb.org/src/util/oddbapp.rb:709:in `block in each_package' (druby://localhost:10005) /usr/local/lib/ruby/gems/1.9.1/gems/odba-1.1.0/lib/odba/stub.rb:112:in `each_value' (druby://localhost:10005) /usr/local/lib/ruby/gems/1.9.1/gems/odba-1.1.0/lib/odba/stub.rb:112:in `method_missing' (druby://localhost:10005) /var/www/oddb.org/src/util/oddbapp.rb:708:in `each_package' (druby://localhost:10005) /var/www/oddb.org/ext/export/src/generics_xls.rb:94:in `export_generics' (druby://localhost:10005) /var/www/oddb.org/ext/export/src/odba_exporter.rb:112:in `block in export_generics_xls' (druby://localhost:10005) /var/www/oddb.org/ext/export/src/odba_exporter.rb:253:in `call' (druby://localhost:10005) /var/www/oddb.org/ext/export/src/odba_exporter.rb:253: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:252:in `safe_export' (druby://localhost:10005) /var/www/oddb.org/ext/export/src/odba_exporter.rb:110:in `export_generics_xls' (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/xls_export.rb:22:in `export_generics' /var/www/oddb.org/src/util/updater.rb:122:in `block in export_generics_xls' /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:120:in `export_generics_xls' /var/www/oddb.org/src/util/updater.rb:297:in `update_bsv_followers' jobs/import_bsv_followers:14: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_bsv_followers:12:in `<module:Util>' jobs/import_bsv_followers:11:in `<module:ODDB>' jobs/import_bsv_followers:10:in `<main>'
When going forward from a fachinfo-online link to changes, diff and back the last step does not go back to home.
This is related that we use sometimes links like de/gcc/fachinfo/swissmedicnr/44493 and at other times de/gcc/fachinfo/reg/44493. I propose to replace everywhere swissmedicnr by reg. This will break some old link, but will reduce the complexity of the code. Also swissmedicnr appears only 5 time in the source code. See commit Replace in all URL swissmedicnr by reg
This was easy, but does not yet solve all problems. We still have URL like /de/gcc/show/fachinfo/44493/diff
, /de/gcc/fachinfo/reg/44493
Changing Watir tests to be logged in as Desitin, not as admin user, as most of our clients are not admins!
Fixed some problems when running test-suites with commits Another try to make unit test finish on travis-ci and Fix running test for ext/fiparse/test_fachinfo_hpricot.rb
Fixed an old problem, that the download dir of firefox/chrome was not set via profiles and that one was sometimes prompted to save. Pushed commit Updated rspec version. Cleanup spec test
Will continue tomorrow to fix the link problem.
Still have the problem that thinpower and oddb-ci2 don't return the same result when searching for Warfarin, e.g. calling bin/admin search_combined('Warfarin', 'de')
.
I find however the following error in /service/ch.oddb/log/main/current
@40000000565d650c29e00244 explain_colors {[0, 0]=>:explain_original, [0, 1]=>:explain_generic, [0, 2]=>"explain_unknown"} @40000000565d650c29e04c7c failsafe rescued ODBA::OdbaResultLimitError < StandardError @40000000565d650c29e05064 ODBA::OdbaResultLimitError @40000000565d650c29e05064 /var/www/oddb.org/src/util/oddbapp.rb:1662:in `instance_eval' @40000000565d650c29e05064 /var/www/oddb.org/src/util/oddbapp.rb:109:in `retrieve_from_index' @40000000565d650c29e0544c /var/www/oddb.org/src/util/oddbapp.rb:1055:in `search_by_interaction' @40000000565d650c29e05c1c /var/www/oddb.org/src/util/oddbapp.rb:994:in `search_oddb' @40000000565d650c29e05c1c /var/www/oddb.org/src/util/oddbapp.rb:1123:in `search_combined' @40000000565d650c29e05c1c (eval):1:in `block (2 levels) in _admin' @40000000565d650c29e06004 /var/www/oddb.org/src/util/oddbapp.rb:1662:in `instance_eval' @40000000565d650c29e06004 /var/www/oddb.org/src/util/oddbapp.rb:1662:in `block (2 levels) in _admin' @40000000565d650c29e067d4 /var/www/oddb.org/src/util/failsafe.rb:10:in `call' @40000000565d650c29e067d4 /var/www/oddb.org/src/util/failsafe.rb:10:in `failsafe' @40000000565d650c29e07f44 /var/www/oddb.org/src/util/oddbapp.rb:1661:in `block in _admin'
I can limit the error via bin/admin to
ch.oddb> search_by_atc('Warfarin') -> [] ch.oddb> search_by_sequence('Warfarin') -> [] ch.oddb> search_by_company('Warfarin') -> [] ch.oddb> search_by_substance('Warfarin') -> [] ch.oddb> search_by_indication('Warfarin') -> [] ch.oddb> search_by_interaction('Warfarin', 'de') -> ODBA::OdbaResultLimitError
Dumping on oddb-ci2 and thinpower the text of all interactions of the fachinfos via bin/admin File.open('/tmp/interaction2.txt', 'w+') { |f| registrations.sort.each{|key, reg| f.puts "#{reg.iksnr}: #{reg.fachinfo.interaction_text(:de)}" if reg.fachinfo}}
. The two files are identical!
I think the problems is rooted in differnt versions of Gentoo, postgresql or gems on oddb-ci2 and thinpower. I don't have much motivation into looking even deeper into this problem when I am quite confident that upgrading to Ruby 2.2.x, a newer PosgreSQL and or running everything in a docker container would allow me to resolve this problem, as it is already solved on oddb-ci2.
Zeno wants me to compare all gems I have on oddb-ci2 (Attach:gems_oddb_ci2.txt) with those on thinpower (Attach:gems_thinpower.txt).
There are many differences. As I had (before I started using rbenv for my watir tests) installed quite a few test gems. Starting by removing them.
Downgrading/installing one gem after another
Now I have less gems installed than on thinpower, but all installed have the same version as the hightest one thinpower. See Attach:gem.list.oddb-ci2.neu.txt
But there are still no problem search for Warfarin via interaction on oddb-ci2.
Pushed commit Added value 'C' (aka Co-Marketing) for GENCD from BAG/Preparations.xml
Looking at where the fachinfo link is created. If I hadn't put in a debug puts (which failed because of a typo), my changes would have been okay. Running all watir test for evidentia, point me to an error (ch.oddb.org should list all SL products before the Non-SL) I have to investigate, too.
I don't since when I have (after search for Levetiracetamum on evidentia.ch) again Non-SL drugs (Infusionskonzentrat) before SL drugs (Filmtabletten).
Pushing my commit Evidentia: No link if no fachinfo