On Fri, May 6, 2011 at 11:37 AM, 1011_wxy <1011_...@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