<< | Index | >>
Task: Fix following error
Plugin: ODDB::TextInfoPlugin Error: Nokogiri::XML::XPath::SyntaxError Message: Invalid expression: //medicalInformation[@type='pi' and @lang='fr']/title[match(., "Capsules PASSIFLORE "Künzle"")] Backtrace: /usr/local/lib/ruby/gems/1.9.1/gems/nokogiri-1.5.0/lib/nokogiri/xml/node.rb:159:in `evaluate' /usr/local/lib/ruby/gems/1.9.1/gems/nokogiri-1.5.0/lib/nokogiri/xml/node.rb:159:in `block in xpath' /usr/local/lib/ruby/gems/1.9.1/gems/nokogiri-1.5.0/lib/nokogiri/xml/node.rb:150:in `map' /usr/local/lib/ruby/gems/1.9.1/gems/nokogiri-1.5.0/lib/nokogiri/xml/node.rb:150:in `xpath' /var/www/oddb.org/src/plugin/text_info.rb:996:in `extract_matched_content' /var/www/oddb.org/src/plugin/text_info.rb:1081:in `block in parse_and_update' /var/www/oddb.org/src/plugin/text_info.rb:1078:in `each' /var/www/oddb.org/src/plugin/text_info.rb:1078:in `parse_and_update' /var/www/oddb.org/src/plugin/text_info.rb:1129:in `block (3 levels) in import_info' /var/www/oddb.org/src/plugin/text_info.rb:1128:in `each' /var/www/oddb.org/src/plugin/text_info.rb:1128:in `block (2 levels) in import_info' /var/www/oddb.org/src/plugin/text_info.rb:1127:in `each_pair' /var/www/oddb.org/src/plugin/text_info.rb:1127:in `block in import_info' /var/www/oddb.org/src/plugin/text_info.rb:1124:in `each_pair' /var/www/oddb.org/src/plugin/text_info.rb:1124:in `import_info' /var/www/oddb.org/src/plugin/text_info.rb:1185:in `block in import_swissmedicinfo_by_index' /var/www/oddb.org/src/plugin/text_info.rb:1184:in `each_pair' /var/www/oddb.org/src/plugin/text_info.rb:1184:in `import_swissmedicinfo_by_index' /var/www/oddb.org/src/plugin/text_info.rb:1230:in `import_swissmedicinfo' /var/www/oddb.org/src/util/updater.rb:500:in `block in update_notify_simple' /var/www/oddb.org/src/util/updater.rb:476:in `call' /var/www/oddb.org/src/util/updater.rb:476:in `wrap_update' /var/www/oddb.org/src/util/updater.rb:494:in `update_notify_simple' /var/www/oddb.org/src/util/updater.rb:303:in `update_textinfo_swissmedicinfo' /var/www/oddb.org/src/util/updater.rb:192:in `run' /var/www/oddb.org/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' /var/www/oddb.org/jobs/import_daily:12:in `<module:Util>' /var/www/oddb.org/jobs/import_daily:11:in `<module:ODDB>' /var/www/oddb.org/jobs/import_daily:10:in `<main>'
27 tests, 47 assertions, 11 failures, 1 errors, 0 skips
test/data/html/text_info/45928.de/fi.html
13) Failure: test_update_product_parse_expression(ODDB::TestTextInfoPlugin) [/usr/local/rvm/gems/ruby-1.9.3-p392/gems/flexmock-1.3.1/lib/flexmock/test_unit_integration.rb:53]: in mock 'parser (simulates ext/fiparse)': no matching handler found for parse_fachinfo_html("/opt/src/oddb.org/test/data/html/text_info/45928.de.html", :documed, "") 28 tests, 47 assertions, 12 failures, 1 errors, 0 skips
xmllint AipsDownload_20130624.xml --format --recover > tee Aips.xml
.
Problem is:
def swissmedicinfo_xml(xml_file = File.join(ODDB.config.data_dir, 'xml', 'AipsDownload_latest.xml')) if @options[:xml_file] xml_file = @options[:xml_file] end Nokogiri::XML(File.open(xml_file,'r').read) end