I am new to use bioservices
Python package. Now I am going to use that to retrieve PMIDs for two citations, given the specified information and this is the code I have tried:
from bioservices import EUtils
s = EUtils()
print(s.ECitMatch("pubmed",retmode="xml", bdata="proc+natl+acad+sci+u+s+a|1991|88|3248|mann+bj|Art1|%0Dscience|1987|235|182|palmenberg+ac|Art2|"))
But it occurs an error:
"TypeError: ECitMatch() got multiple values for argument 'bdata'".
Could anyone help me to solve that problem?
I think the issue is that you have an unnamed argument (
pubmed
); if you look at the source code, you can see that the first argument should bebdata
; if you provide the arguments like you do, it is, however, unclear whetherbdata
is"pubmed"
or the named argumentbdata
, therefore the error you obtain.You can reproduce it with this minimal example:
will return
If you remove
"pubmed"
, the error disappears, however, the output is still incomplete:returns
so only the first publication is taken into account. You can get the results for both by using the correct carriage return character
\r
:will return
I think you neither have to specify
retmod
nor the database (pubmed
); if you look at the source code I linked above you can see:so seems it always uses
pubmed
andxml
.