Problem with urllib.urlopen()

Christopher chris_mk at
Wed Jun 5 19:23:09 CEST 2002

Actually, the link in the browser (IE and Netscape on a Win2K machine
with a LAN connection (work) and IE on Win98 and IE on WinXP on a
56K(both home)) should show a page containing XML versions of the
journal entries as returned in the first link.  Python, instead,
returns the "no current query" reponse.  Thanks.


(some of the code is attached(the current format doesn't matter, I
have a script that will translate it into 'real' XML...)

<MedlineCitation Status="In-Process">
<ArticleTitle>The ner Gene of Photorhabdus: Effects on
Primary-Form-Specific Phenotypes and Outer Membrane Protein
<AbstractText>The nematode-bacterium complex of
Heterorhabditis-Photorhabdus is pathogenic to insect larvae. The
bacteria undergo a form of phenotypic switching whereby the primary
form, at the stationary phase of the growth cycle, makes a range of
products and has the capacity to support nematode growth, whereas the
secondary form does not express these phenotypes. The work described
here investigated the mechanism regulating phenotypic variation by
transforming the primary cells with secondary-form DNA on a
low-copy-number vector and screening for colonies which did not
produce the yellow pigment characteristic of primaries. Four
transformants all carrying the same gene were found to loose
primary-form-specific characteristics, and the gene was sequenced and
identified as ner, a regulatory gene in gram-negative bacteria and
their phages. Unexpectedly, inactivation of the endogenous gene in the
secondaries did not cause them to revert to the primary phenotype, and
the gene was expressed in the primary form as well as the secondary
form during exponential but not stationary phase and deregulated in
the plasmid-bearing primary form. These and other pieces of evidence
indicate that the endogenous ner gene is not responsible for the
secondary phenotype, but that ner, when overexpressed, can repress
expression of primary phenotypes at stationary phase. Inactivation of
the endogenous ner gene in the primary form affected the outer
membrane protein profile. A number of outer membrane proteins
displayed differential accumulation in the primary and secondary forms
at stationary phase, and two of the primary-form-specific proteins
were absent from the ner primary strain.</AbstractText>
<Affiliation>Department of Biology, National University of
Ireland, Maynooth, Ireland.</Affiliation>
<ForeName>Keith H</ForeName>
<ForeName>Declan M</ForeName>
<ForeName>David J</ForeName>
<ForeName>Barbara C A</ForeName>
<PublicationType>Journal Article</PublicationType>
<Country>United States</Country>
<MedlineTA>J Bacteriol</MedlineTA>

"Steve Holden" <sholden at> wrote in message news:<WSnL8.268879$%u2.175369 at>...
> Just to be sure, do you expect the second link (in a browser) to show "Error
> handling request: no current query"? This seems to work w/Python 2.2 under
> cygwin, at least. There was so much output I omitted quite a lot, replaced
> by ellipses below:
> >>> import urllib
> >>> f =
> urllib.urlopen("""
> db=PubMed&details_term=%28%22glucagon%22%5BMeSH%20Terms%5D%20OR%20glucagon%5
> BText%20Word%5D%29&dopt=XML&query_key=1""")
> >>> ll  =
> >>> ll
> '<html>\n  <head> ...
> <table
> cellpadding="0" cellspacing="0" width="100%"><tr><td bgcolor="#ffcccc">Error
> handling request: no current query<BR></td></tr></table> ...
> </body>\n</html>\n'
> >>>
> regards
>  Steve

More information about the Python-list mailing list