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 6770991
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T15:22:46+00:00 2026-05-26T15:22:46+00:00

I have a scripts designed to access an online API (Google Search Appliance), which

  • 0

I have a scripts designed to access an online API (Google Search Appliance), which requires a specific xml format be posted. I have built an xml document using lxml, but my problem is that upon attempting to create the root node, I am given a ValueError: Invalid namespace URI Exception. Here is the full example:

gsa_ns="http://schemas.google.com/gsa/2007"
default_ns="http://www.w3.org/2005/Atom"

gsa="{%s}"%gsa_ns
default="{%s}"%default_ns

nsmap={None:default, "gsa":gsa}

entry=et.Element(default+"entry",nsmap=nsmap)

And the exception thrown is below:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "lxml.etree.pyx", line 2557, in lxml.etree.Element (src/lxml/lxml.etree.c:50983)
  File "apihelpers.pxi", line 156, in lxml.etree._makeElement (src/lxml/lxml.etree.c:12231)
  File "apihelpers.pxi", line 143, in lxml.etree._makeElement (src/lxml/lxml.etree.c:12097)
  File "apihelpers.pxi", line 257, in lxml.etree._initNodeNamespaces (src/lxml/lxml.etree.c:13125)
  File "apihelpers.pxi", line 1567, in lxml.etree._uriValidOrRaise (src/lxml/lxml.etree.c:24339)
ValueError: Invalid namespace URI u'{http://schemas.googls.com/gsa/2007}'

Can someone explain what this means? I am behind an http proxy, but I don’t think that is a problem, as when I remove the GSA namespace and keep only w3.org namespace, I do not get the exception.

  • 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-26T15:22:47+00:00Added an answer on May 26, 2026 at 3:22 pm

    URIs of namespaces are never looked up by the parser, it doesn’t matter if you’re behind a proxy or not. But the parser in lxml 2.3 checks whether they are valid URIs. So it should be

    nsmap = {None: default_ns, "gsa": gsa_ns}
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have designed an online editor with which a user can create files and
CGI scripts should have access to a list of environment variables set by the
I have a bunch of scripts (which can't be modified) written on Windows. Windows
I have a script that is designed to parse XML postbacks from Ultracart, right
I have designed a data model which has almost 24 tables. I have finished
I have scripts in my ASPX page, in the header section. I want to
I have two scripts that often need to be run with the same parameter:
I have some scripts that ought to have stopped running but hang around forever.
I have a scripts that retrieves huge data on a table. I want to
Why cgi scripts have to stay in cgi-bin folder ? What is the difference

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.