Electronics & Programming

develissimo

Open Source electronics development and programming

  • You are not logged in.

#1 Dec. 1, 2010 13:18:31

vamsy k.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

minidom parsestring error


Hi,

I have a function to read and display an RSS feed which is working as
expected in my local Apache. However I'm getting a HTTP 502 error when
I access the same on Webfaction. Below is a snippet from my code and
the error is originating from the last step involving parsing.

Like i mentioned the below code works locally with the same feed and
this also works on the python shell on Webfaction. However is is
failing while accessing through my browser. Any help will be
appreciated. Thanks

feed_url = 'http://blog.ionlab.in/feed/'
file_request = urllib2.Request(feed_url)
file_opener = urllib2.build_opener()
file_feed = file_opener.open(file_request).read()
file_xml = minidom.parseString(file_feed)

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

#2 Dec. 1, 2010 14:06:48

Daniel R.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

minidom parsestring error


On Dec 1, 1:18 pm, vamsy krishna <badguitar...@gmail.com> wrote:
> Hi,
>
> I have a function to read and display an RSS feed which is working as
> expected in my local Apache. However I'm getting a HTTP 502 error when
> I access the same on Webfaction. Below is a snippet from my code and
> the error is originating from the last step involving parsing.
>
> Like i mentioned the below code works locally with the same feed and
> this also works on the python shell on Webfaction. However is is
> failing while accessing through my browser. Any help will be
> appreciated. Thanks
>
>     feed_url = 'http://blog.ionlab.in/feed/'
>     file_request = urllib2.Request(feed_url)
>     file_opener = urllib2.build_opener()
>     file_feed = file_opener.open(file_request).read()
>     file_xml = minidom.parseString(file_feed)

Failing how? What is the error?
--
DR.

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

#3 Dec. 1, 2010 14:31:51

vamsy k.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

minidom parsestring error


I see a 502 Bad Request on the browser and the server is auto-shutting
down. I do not see any error logs even though am using a try except
block for the line

file_xml = minidom.parseString(file_feed)

None of the logs output beyond this line and the execution seems to
halt. I haven't seen a 502 error on the server before. This is a new
code.

On Dec 1, 7:06 pm, Daniel Roseman <dan...@roseman.org.uk> wrote:
> On Dec 1, 1:18 pm, vamsy krishna <badguitar...@gmail.com> wrote:
>
>
>
> > Hi,
>
> > I have a function to read and display an RSS feed which is working as
> > expected in my local Apache. However I'm getting a HTTP 502 error when
> > I access the same on Webfaction. Below is a snippet from my code and
> > the error is originating from the last step involving parsing.
>
> > Like i mentioned the below code works locally with the same feed and
> > this also works on the python shell on Webfaction. However is is
> > failing while accessing through my browser. Any help will be
> > appreciated. Thanks
>
> >     feed_url = 'http://blog.ionlab.in/feed/'
> >     file_request = urllib2.Request(feed_url)
> >     file_opener = urllib2.build_opener()
> >     file_feed = file_opener.open(file_request).read()
> >     file_xml = minidom.parseString(file_feed)
>
> Failing how? What is the error?
> --
> DR.

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

Board footer

Moderator control

Enjoy the 17th of August
PoweredBy

The Forums are managed by develissimo stuff members, if you find any issues or misplaced content please help us to fix it. Thank you! Tell us via Contact Options
Leave a Message
Welcome to Develissimo Live Support