ironpython import BeautifulSoup SystemError:对象引用未设置为对象的实例

时间:2015-03-10 20:18:03

标签: python beautifulsoup ironpython

我正在尝试让BeautifulSoup在Windows上的IronPython中运行。

我已经通过使用IronPython运行安装脚本来安装BeautifulSoup:

cd Downloads\dist\beautifulsoup4-4.3.2
ipy setup.py install

但是当我尝试在IronPython中导入BeautifulSoup时,我收到一个错误:

C:\>ipy
IronPython 2.7.5 (2.7.5.0) on .NET 4.0.30319.34209 (32-bit)
Type "help", "copyright", "credits" or "license" for more information.
>>> from bs4 import BeautifulSoup
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Program Files (x86)\IronPython 2.7\lib\site-packages\bs4\__init__.py", line 30, in <module>
  File "C:\Program Files (x86)\IronPython 2.7\lib\site-packages\bs4\builder\__init__.py", line 308, in <module>
SystemError: Object reference not set to an instance of an object.

bs4\builder\__init__.py中的违规行是:

308: from . import _htmlparser

在同一目录中有一个名为_htmlparser.py的模块。

请帮忙!

0 个答案:

没有答案