Bug 352629

Summary: No results displayed for known good query
Product: [Applications] KBibTeX Reporter: Richard L <scanrikpo>
Component: Network/online searchAssignee: Thomas Fischer <fischer>
Status: RESOLVED WORKSFORME    
Severity: normal    
Priority: NOR    
Version First Reported In: 0.6   
Target Milestone: ---   
Platform: openSUSE   
OS: Other   
URL: http://www.ncbi.nlm.nih.gov/pubmed
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Richard L 2015-09-12 21:32:09 UTC
PubMed uses a two step protocol: 1) search and store in history; 2) fetch from history.
KBibTeX sends the correct initial "HTTP: GET /pubmed/? ...", so step 1) is done.
However, I do not see the follow-on GET commands to retrieve the data from history.

Also, PubMed returns data in the .nbib or .xml formats, neither of which do I see supported by KBibTeX.

Reproducible: Always

Steps to Reproduce:
1. Select checkbox for PubMed; turn off all others.
2. Add an author, for example: "Hord, Norman G."
3. Hit search

Actual Results:  
No results

Expected Results:  
About 19 results.

Check the full transaction sequence compared to that issuing from the browser interface to the Advanced Search page. (I used WireShark.)

PubMed searches used to work. (When?)
The SOAP protocol was obsoleted by ncbi.nlm.nih.gov in July. IDK whether KBibTeX is trying to use it.
Comment 1 Thomas Fischer 2015-09-16 21:33:28 UTC
The lack of results for your query stems from the way how KBibTeX processes the user's input and what format "esearch" expects.
First, KBibTeX separates the user's input along spaces, unless quotation marks are used. Entering  Hord, Norman G.    searches for three authors.
Second, esearch expects queries for author names to be in the specific format of "lastname firstnamesfirstletter", e.g. in your case "hord n" or "hord ng" (you still need the quotation marks, otherwise you'll search for authors  hord  and   ng  .
I agree that KBibTeX should invest some effort into parsing the user input an make an intelligent guess what the user's intentions are to auto-format the input before sending it to PubMed.

Unfortunately, there is a small bug with the choking of PubMed requests, which prevents you from making more than one request per week without restarting KBibTeX. I have a local fix, but I still need to test and push it.
Comment 2 Thomas Fischer 2015-09-17 07:38:41 UTC
(In reply to Thomas Fischer from comment #1)
> Unfortunately, there is a small bug with the choking of PubMed requests,
> which prevents you from making more than one request per week without
> restarting KBibTeX. I have a local fix, but I still need to test and push it.
I just pushed the patch to several branches in git, including master, kbibtex/0.7, and kbibtex/0.6. Please test and confirm that the choking works as expected. If choking is active and blocks a search and you have started KBibTeX from a terminal, you should see a warning message in this terminal.
Comment 3 Richard L 2015-09-17 20:43:23 UTC
Thomas,

I followed the instructions at gna.org to download the latest code from 
git.
Alas, Yast blows up while trying to install the various QT5 development 
files required to build KBibTeX. (Something about a conversion error 
UTF-8 to UTF-16, I think.)

In short, I am unable to build the executable in order to test. My 
apologies.

  - Richard

On 9/17/2015 12:38 AM, Thomas Fischer wrote:
> https://bugs.kde.org/show_bug.cgi?id=352629
>
> Thomas Fischer <fischer@unix-ag.uni-kl.de> changed:
>
>             What    |Removed                     |Added
> ----------------------------------------------------------------------------
>           Resolution|LATER                       |WORKSFORME
>
> --- Comment #2 from Thomas Fischer <fischer@unix-ag.uni-kl.de> ---
> (In reply to Thomas Fischer from comment #1)
>> Unfortunately, there is a small bug with the choking of PubMed requests,
>> which prevents you from making more than one request per week without
>> restarting KBibTeX. I have a local fix, but I still need to test and push it.
> I just pushed the patch to several branches in git, including master,
> kbibtex/0.7, and kbibtex/0.6. Please test and confirm that the choking works as
> expected. If choking is active and blocks a search and you have started KBibTeX
> from a terminal, you should see a warning message in this terminal.
>
Comment 4 Thomas Fischer 2015-09-18 18:23:37 UTC
The instructions on gna.org have not been updated to Qt5/KF5. Please check the more recent documentation in KDE's UserBase Wiki:
https://userbase.kde.org/KBibTeX/Development

In case that you have trouble with the Qt5/KF5-based code, please test branches "kbibtex/0.6" and "kbibtex/0.7" which are still based on KDE4.

Still, it sounds very strange that you have problems with UTF-16. That encoding is very uncommon (in my experience) on Linux and more popular on Windows.

Maybe you can ask some of the people who build packages for KBibTeX to create a testing package based on the kbibtex/0.7 branch for you:
https://build.opensuse.org/search?search_text=kbibtex
Comment 5 Thomas Fischer 2016-02-15 19:28:19 UTC
> In short, I am unable to build the executable in order to test. My 
> apologies.
Have you succeeded since then to build KBibTeX? It would be helpful if you could test either the lastest stable version or the master branch to see if the PubMed search (still) does (not) work for you.
Comment 6 Thomas Fischer 2016-10-26 20:10:24 UTC
1. No updates for a full year.
2. PubMed works for me.
3. Used API is not obsolete upstream.
-> Closing bug