Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5985811
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T22:35:01+00:00 2026-05-22T22:35:01+00:00

I am writing code to work with Amazon query based APIs, which return XML

  • 0

I am writing code to work with Amazon query based APIs, which return XML which I then wish to parse with lxml. I have written several functions which work perfectly to load the XML and parse it.

Each function loads the XML using:

variable = lxml.etree.parse("http://...")

This works perfectly, the FIRST time it is run. However, if I wish to load a second URL (be it the same one, or a different one) during the course of a running python session, I get the error:

lxml.etree.XMLSyntaxError: Attempt to load network entity http://...

(Of course, the ellipses are replaced in both cases with the rest of the URL.)

Therefore, for some reason, I appear to be unable to load two XML documents using the parse method in a running python session.

Does anyone know what I may be doing wrong here, or have a solution?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T22:35:01+00:00Added an answer on May 22, 2026 at 10:35 pm

    Known unfixed bug.

    Use urllib2.urlopen() to get a file-like object and pass that to lxml.etree.parse()

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm writing mostly embedded code at work. We have a big long-term project that's
When writing code, especially when dealing with dates and times, you have to work
I'm interested in experimenting with writing R code on my laptop which I then
I'm writing some code that id like to be able to work with any
I am writing a piece of code that to work would require an extensive
Are there any guidelines to writing Google App Engine Python code that would work
I am writing code that compares 2 bytes which represent integers. I want to
I'm writing code to work with text from Wikipedia and am having issues with
I am writing code in VS2005 using its STL. I have one UI thread
Well, now i have a new problem. Im writing code in C# I want

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.