[twill] BeautifulSoup conflicts
twill.overbored at spamgourmet.com
Sun Jul 2 20:18:27 PDT 2006
On 7/2/06, Stephen Thorne - stephen at netboxblue.com
> twill.overbored at spamgourmet.com wrote:
> > Hi all,
> > I'm trying to use both twill and BeautifulSoup. I downloaded the
> > latest BeautifulSoup (3.0.3) and have the following simple program:
> > from BeautifulSoup import BeautifulSoup
> > from twill.commands import *
> > from twill.errors import *
> > from twill import *
> > from sys import *
> > go('http://youtube.com/')
> > follow( 'Log In' )
> > This raises a hard-to-decipher exception. Once I remove the
> > BeautifulSoup improt, everything's fine. Should this be filed as a
> > twill bug? Any workarounds in the meantime? Thanks in advance.
> Works For Me.
> Perhaps twill, which includes its own copy of bsoup, is conflicting in
> some way with the version you're importing. Perhaps the best thing to do
Yeah, this is what I was trying to get at.
> here would be to replace twill's beautifulsoup with the version you're
> trying to run, and run the twill tests. That would help us debug the
I replaced twill's BeautifulSoup with BeautifulSoup 3.0.3, and I seem
to be getting the same problem (same exception).
> Is Bsoup3.0.3 required for your application? If you import beautifulsoup
> after twill, it should be okay (twill mutates sys.path to get its own
> version before the system installed version).
No, it's not required, but I'm trying to use a bunch of existing code
that only works with 3.0.3 (eg find()/findAll() instead of fetch*()).
> Stephen Thorne
> Development Engineer
> Scanned by the NetBox from NetBox Blue
More information about the twill