Problem with urllib.urlopen()

Christopher chris_mk at hotmail.com
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.

Chris

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

<PubMedArticle>
<MedlineCitation Status="In-Process">
<MedlineID>21999273</MedlineID>
<PMID>12003952</PMID>
<DateCreated>
<Year>2002</Year>
<Month>05</Month>
<Day>10</Day>
</DateCreated>
<Article>
<Journal>
<ISSN>0021-9193</ISSN>
<JournalIssue>
<Volume>184</Volume>
<Issue>11</Issue>
<PubDate>
<Year>2002</Year>
<Month>Jun</Month>
<Day>1</Day>
</PubDate>
</JournalIssue>
</Journal>
<ArticleTitle>The ner Gene of Photorhabdus: Effects on
Primary-Form-Specific Phenotypes and Outer Membrane Protein
Composition.</ArticleTitle>
<Pagination>
<MedlinePgn>3096-105</MedlinePgn>
</Pagination>
<Abstract>
<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>
</Abstract>
<Affiliation>Department of Biology, National University of
Ireland, Maynooth, Ireland.</Affiliation>
<AuthorList>
<Author>
<LastName>O'Neill</LastName>
<ForeName>Keith H</ForeName>
<Initials>KH</Initials>
</Author>
<Author>
<LastName>Roche</LastName>
<ForeName>Declan M</ForeName>
<Initials>DM</Initials>
</Author>
<Author>
<LastName>Clarke</LastName>
<ForeName>David J</ForeName>
<Initials>DJ</Initials>
</Author>
<Author>
<LastName>Dowds</LastName>
<ForeName>Barbara C A</ForeName>
<Initials>BC</Initials>
</Author>
</AuthorList>
<Language>eng</Language>
<PublicationTypeList>
<PublicationType>Journal Article</PublicationType>
</PublicationTypeList>
</Article>
<MedlineJournalInfo>
<Country>United States</Country>
<MedlineTA>J Bacteriol</MedlineTA>
<NlmUniqueID>2985120R</NlmUniqueID>
</MedlineJournalInfo>
<CitationSubset>IM</CitationSubset>
</MedlineCitation>
<PubmedData>


"Steve Holden" <sholden at holdenweb.com> wrote in message news:<WSnL8.268879$%u2.175369 at atlpnn01.usenetserver.com>...
> 
> 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("""http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Display&
> db=PubMed&details_term=%28%22glucagon%22%5BMeSH%20Terms%5D%20OR%20glucagon%5
> BText%20Word%5D%29&dopt=XML&query_key=1""")
> >>> ll  = f.read()
> >>> 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