[referencer] about pubmed plugin
John Spray
jcspray at icculus.org
Mon Mar 24 12:22:47 EDT 2008
On Mon, 2008-03-24 at 17:09 +0100, Aurélien Naldi wrote:
> Exception: <type 'exceptions.UnicodeDecodeError'>
> Explication: 'ascii' codec can't decode byte 0xc3 in position 1:
> ordinal not in range(128)
>
>
> The following fixes it for me, I hope it doesn't create any other kind
> of problem...
>
>
> print "DOI ", query, " has PubMed ID ", id
>
> - return get_citation_from_pmid (id)
> + return get_citation_from_pmid (id.encode("utf-8"))
That's pretty strange: the pmid is just a number, so utf-8 and ascii
would have the same representation. Which implies that minidom was
giving us something other than either of those. Your system isn't
configured for something crazy like UTF-16 is it?
The python stuff is potentially rife with encoding stuff that I haven't
thought about. One of the pitfalls of being English: ASCII was enough
for us! ;-)
John
More information about the referencer
mailing list