为python 3.7安装了boilerpipe库
为了测试,我决定检查这样一个简单的例子:
from boilerpipe.extract import Extractor
extractor = Extractor(extractor='ArticleExtractor', convertStrings=False ,url="http://en.wikipedia.org/wiki/Main_Page")
print(extractor.getText())
当我运行代码时,我收到此错误:
C:\Users\Администратор\AppData\Local\Programs\Python\Python37-32\lib\site-packages\jpype\_core.py:210: UserWarning:
-------------------------------------------------------------------------------
Deprecated: convertStrings was not specified when starting the JVM. The default
behavior in JPype will be False starting in JPype 0.8. The recommended setting
for new code is convertStrings=False. The legacy value of True was assumed for
this session. If you are a user of an application that reported this warning,
please file a ticket with the developer.
-------------------------------------------------------------------------------
""")
Process finished with exit code -1073740791 (0xC0000409)
如何解决这个错误?
我明白错误是什么。该库使用 Jpypi 的旧 API,如果出现此警告。解决方案是安装 Jpype 版本 0.6.3。
在我删除了 Boilerpipe 库之后。并安装了更新的Boilerpipe库分支
之后一切正常!
PS:特别感谢这位年度人物