URL causes a Segmentation Fault on BS4. BS3 is fine.

232 views
Skip to first unread message

Jonathan Vanasco

unread,
Apr 17, 2012, 10:19:24 PM4/17/12
to beautifulsoup
Parsing this URL will cause a segfault under Beautiful Soup 4

http://www.nasa.gov/externalflash/discovery/index.html

It parses fine under Beautiful Soup 3

Jonathan Vanasco

unread,
Apr 17, 2012, 10:25:40 PM4/17/12
to beautifulsoup
I should add - I've tried this under all the parsers. Same result.

Leonard Richardson

unread,
Apr 17, 2012, 10:53:13 PM4/17/12
to beauti...@googlegroups.com
I get a segfault with lxml but not with html5lib or html.parser. What
does your parse code look like?

for library in ['html5lib', 'html.parser', 'lxml']:
print library
BeautifulSoup(markup, library)

Leonard

On Tue, Apr 17, 2012 at 10:25 PM, Jonathan Vanasco
<jona...@findmeon.com> wrote:
> I should add - I've tried this under all the parsers.  Same result.
>

> --
> You received this message because you are subscribed to the Google Groups "beautifulsoup" group.
> To post to this group, send email to beauti...@googlegroups.com.
> To unsubscribe from this group, send email to beautifulsou...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/beautifulsoup?hl=en.
>

Leonard Richardson

unread,
Apr 18, 2012, 10:20:18 AM4/18/12
to beauti...@googlegroups.com
The segfault looks to be caused by a bug in lxml. I've filed a bug against lxml:

https://bugs.launchpad.net/lxml/+bug/984936

I can't say for sure without seeing your test code, but I think
there's a mistake in it (a mistake I make all the time), and that
you're actually using lxml each time. Let me know if I'm wrong.

If you let me know what version of lxml you're running, I can add that
information to the LXML bug report.

Leonard

leonardr

unread,
Apr 20, 2012, 10:33:44 AM4/20/12
to beautifulsoup
The lxml bug has been fixed!

https://bugs.launchpad.net/lxml/+bug/984936

Leonard
Reply all
Reply to author
Forward
0 new messages