Previews in Medicines lens not displaying as expected
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
One Hundred Scopes |
Incomplete
|
Undecided
|
Mark Tully |
Bug Description
Hi!
Sorry for posting it here! (feel free to delete it)
I see on your Google+ page that you have updated the Medicines lens with interesting stuff, but unfortunately it doesn't seem to fully work.
The lens is usable but the previews are not appearing/working, tested on Ubuntu 12.10 and Ubuntu 13.04
in terminal this is the error, for /usr/lib/
Traceback (most recent call last):
File "/usr/lib/
link = tree.xpath(
IndexError: list index out of range
Traceback (most recent call last):
File "/usr/lib/
link = tree.xpath(
IndexError: list index out of range
Traceback (most recent call last):
File "/usr/lib/
link = tree.xpath(
IndexError: list index out of range
The error indicates a problem parsing the wikipedia page with the drug information on it. Does this occur for all results or just for some? Can you give me an example of a search term that causes this to occur so that I can reproduce it?
The solution is probably a putting try: except: around the whole section which would leave the preview blank, but at least not throw an exception. Not all drugs have a wikipedia page and some have one, but without the infobox that the lens is parsing. This is an unavoidable drawback of using a freely editable source for data.