Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"No parser was explicitly specified" - warning while using get_dataset_names #2171

Closed
sauravshandilya opened this issue Jul 25, 2020 · 1 comment

Comments

@sauravshandilya
Copy link

Hello,

When using get_dataset_names(), I got following UserWarning.

The issue is with the usage of BeautifulSoup. Explicit parser needs to be specified to suppress the warning when using BeautifulSoup.

gh_list = BeautifulSoup(http)

should be changed to

gh_list = BeautifulSoup(http, features='lxml')

/usr/local/lib/python3.6/dist-packages/seaborn/utils.py:384: UserWarning: No parser was explicitly specified, so I'm using the best available HTML parser for this system ("lxml"). This usually isn't a problem, but if you run this code on another system, or in a different virtual environment, it may use a different parser and behave differently.

The code that caused this warning is on line 384 of the file /usr/local/lib/python3.6/dist-packages/seaborn/utils.py. To get rid of this warning, pass the additional argument 'features="lxml"' to the BeautifulSoup constructor.

  gh_list = BeautifulSoup(http)
['anscombe',
 'attention',
 'brain_networks',
 'car_crashes',
 'diamonds',
 'dots',
 'exercise',
 'flights',
 'fmri',
 'gammas',
 'geyser',
 'iris',
 'mpg',
 'penguins',
 'planets',
 'tips',
 'titanic']

This issue was earlier reported in #894. The fix specified in issue comment 58b5121 does not solve the problem.

Version Details:
sns : 0.10.1
bs : 4.6.3
matplotlib : 3.2.2

Thank You.

@sauravshandilya sauravshandilya changed the title No parser was explicitly specified warning while using get_dataset_names "No parser was explicitly specified" - warning while using get_dataset_names Jul 25, 2020
@mwaskom
Copy link
Owner

mwaskom commented Aug 11, 2020

Obviated by #2190

@mwaskom mwaskom closed this as completed Aug 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants