Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
XML parsing failing in production, fine on local env.
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  6 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Uber Monjies  
View profile  
 More options Oct 2 2009, 1:14 pm
From: Uber Monjies <stir...@gmail.com>
Date: Fri, 2 Oct 2009 10:14:46 -0700 (PDT)
Local: Fri, Oct 2 2009 1:14 pm
Subject: XML parsing failing in production, fine on local env.
response = urlfetch.fetch(url, headers={'AUTHORIZATION' : authString})
                if response.status_code == 200:
                        dom = minidom.parseString(response.content)
                        doc = dom.getElementsByTagName('token')[0]
                        guid = doc.getElementsByTagName('guid')[0].firstChild.data

This little chunk of code works perfect in my local environment, but
when I deploy it, the live version chokes with:

  File "/base/data/home/apps/hootiehub/1.336752955878404037/
tweeple.py", line 17, in init_user
    dom = minidom.parseString(response)
  File "/base/python_dist/lib/python2.5/xml/dom/minidom.py", line
1923, in parseString
    return expatbuilder.parseString(string)
  File "/base/python_dist/lib/python2.5/xml/dom/expatbuilder.py", line
940, in parseString
    return builder.parseString(string)
  File "/base/python_dist/lib/python2.5/xml/dom/expatbuilder.py", line
223, in parseString
    parser.Parse(string, True)
ExpatError: no element found: line 1, column 1

Any idea why it would work locally, but not in production?

Many thanks!


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Adam  
View profile  
 More options Oct 2 2009, 2:44 pm
From: Adam <adam.crossl...@gmail.com>
Date: Fri, 2 Oct 2009 11:44:39 -0700 (PDT)
Local: Fri, Oct 2 2009 2:44 pm
Subject: Re: XML parsing failing in production, fine on local env.
Have you looked at what is in response.content under the two different
circumstances? The first thing that I would do is see if the urlfetch
is getting me two different sets of results in the two environments.
Why that would happen is very difficult to say without knowing what
resource is being retrieved, from where and what the body actually
looks like.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Uber Monjies  
View profile  
 More options Oct 2 2009, 3:41 pm
From: Uber Monjies <stir...@gmail.com>
Date: Fri, 2 Oct 2009 12:41:19 -0700 (PDT)
Local: Fri, Oct 2 2009 3:41 pm
Subject: Re: XML parsing failing in production, fine on local env.
Thanks...

"response.content" is empty, but response =
"<google.appengine.api.urlfetch._URLFetchResult object at
0xeec179be9ea79a60>"

Is there some other way of cracking into that URLFetchResult object?

Thanks again.

On Oct 2, 1:44 pm, Adam <adam.crossl...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Uber Monjies  
View profile  
 More options Oct 2 2009, 3:45 pm
From: Uber Monjies <stir...@gmail.com>
Date: Fri, 2 Oct 2009 12:45:32 -0700 (PDT)
Local: Fri, Oct 2 2009 3:45 pm
Subject: Re: XML parsing failing in production, fine on local env.
Maybe have something to do with the url being https?  It's returning a
URLFetchResult, but apparently nothing is in the "content"...
stumped.  All works fine on my local machine.

On Oct 2, 2:41 pm, Uber Monjies <stir...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Uber Monjies  
View profile  
 More options Oct 2 2009, 4:26 pm
From: Uber Monjies <stir...@gmail.com>
Date: Fri, 2 Oct 2009 13:26:27 -0700 (PDT)
Local: Fri, Oct 2 2009 4:26 pm
Subject: Re: XML parsing failing in production, fine on local env.
Logging the response.status_code shows a 401, which is unauthorized?!
I am using the exact same auth string from my local environment... is
there something specific to tweak for the production environment?

Thanks so much, this is driving me mad :)

On Oct 2, 2:45 pm, Uber Monjies <stir...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Wooble  
View profile  
 More options Oct 3 2009, 9:08 pm
From: Wooble <geoffsp...@gmail.com>
Date: Sat, 3 Oct 2009 18:08:25 -0700 (PDT)
Local: Sat, Oct 3 2009 9:08 pm
Subject: Re: XML parsing failing in production, fine on local env.
I'd guess the site you're fetching from is blocking Google's IPs.

On Oct 2, 4:26 pm, Uber Monjies <stir...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »