Python 使用Seaborn时出现美化组模块错误(html解析器)

Python 使用Seaborn时出现美化组模块错误(html解析器),python,beautifulsoup,seaborn,Python,Beautifulsoup,Seaborn,我正在使用seaborn绘制一个图表 首先,我想获得样本数据集的名称 sns.get\u dataset\u names() 但这返回了一个错误: The code that caused this warning is on line 384 of the file C:\Users\pc\Anaconda3\envs\seaborn\lib\site-packages\seaborn\utils.py. To get rid of this warning, pass the additio

我正在使用seaborn绘制一个图表

首先,我想获得样本数据集的名称

sns.get\u dataset\u names()

但这返回了一个错误:

The code that caused this warning is on line 384 of the file C:\Users\pc\Anaconda3\envs\seaborn\lib\site-packages\seaborn\utils.py. To get rid of this warning, pass the additional argument 'features="html.parser"' to the BeautifulSoup constructor

我如何解决这个问题?我知道我可以忽略这个错误,但我想消除它,这样它就不会显示出来。

说清楚,这不是一个错误。这只是一个警告。 您必须进入
utils.py
中的seaborn函数才能将其添加到中

def get_dataset_names():
    """Report available example datasets, useful for reporting issues."""
    # delayed import to not demand bs4 unless this function is actually used
    from bs4 import BeautifulSoup
    http = urlopen('https://github.com/mwaskom/seaborn-data/')
    gh_list = BeautifulSoup(http, 'html.parser')  #<-- you'd need to add the parameter here

    return [l.text.replace('.csv', '')
            for l in gh_list.find_all("a", {"class": "js-navigation-open"})
            if l.text.endswith('.csv')]
def get_dataset_names():
“”“报告可用的示例数据集,对报告问题很有用。”“”
#延迟导入不需要bs4,除非实际使用此功能
从bs4导入BeautifulSoup
http=urlopen('https://github.com/mwaskom/seaborn-data/')

gh_list=BeautifulSoup(http,'html.parser')#谢谢!我知道这只是一个警告,但我只是想摆脱它。是的,这很烦人。