Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #4791 > unrolled thread

回复: Re: BeautifulSoup import error

Started by"1011_wxy"<1011_wxy@163.com>
First post2011-05-06 10:29 +0800
Last post2011-05-06 10:29 +0800
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python


Contents

  回复:  Re: BeautifulSoup import error "1011_wxy"<1011_wxy@163.com> - 2011-05-06 10:29 +0800

#4791 — 回复: Re: BeautifulSoup import error

From"1011_wxy"<1011_wxy@163.com>
Date2011-05-06 10:29 +0800
Subject回复: Re: BeautifulSoup import error
Message-ID<mailman.1221.1304649711.9059.python-list@python.org>

[Multipart message — attachments visible in raw view] — view raw

Dear JM:

Thank you very much.
BeautifulSoup does not work well with Python3.2 .



2011-05-06



Kerry



发件人: James Mills <prologic@shortcircuit.net.au>
发送时间: 2011-05-06 09:47
主 题: Re: BeautifulSoup import error
收件人: python list <python-list@python.org>



On Fri, May 6, 2011 at 11:37 AM, 1011_wxy <1011_wxy@163.com> wrote: 
> I got a import error when I use Python 3.2 to import BeautifulSoup 3.2.0 . 
> Is there any differences between Python 3.2 and other version? This is my 
> first time to use Python3.2 . 
> And the error message will be as below. 

Judging from your tracebacks, it would appear 
that BeuituflSoup has not yet been ported to 
and/or fixed for Python 3 compatibility. 

Maybe there's a later version of BeauitifulSOup 
or a development version that does support Python 3? 

There are several Syntax differences between 
Python 2.x and Python 3.x - notably: 

except Exception, e: # Python 2.x 

except Exception as e: # Python 3.x 

I might suggest you take a look at using lxml instead 
which ships with the standard library. 

[ ... ] 

cheers 
James 

--  
-- James Mills 
-- 
-- "Problems are solved by method" 
--  
http://mail.python.org/mailman/listinfo/python-list 

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web