Skip to content

Commit 91b9051

Browse files
committed
Merge pull request #8110 from jorisvandenbossche/err-bs
ER: clarify import error message of BeautifulSoup (read_html)
2 parents 98cc290 + ec919fd commit 91b9051

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pandas/io/html.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -645,9 +645,9 @@ def _parser_dispatch(flavor):
645645

646646
if flavor in ('bs4', 'html5lib'):
647647
if not _HAS_HTML5LIB:
648-
raise ImportError("html5lib not found please install it")
648+
raise ImportError("html5lib not found, please install it")
649649
if not _HAS_BS4:
650-
raise ImportError("bs4 not found please install it")
650+
raise ImportError("BeautifulSoup4 (bs4) not found, please install it")
651651
if bs4.__version__ == LooseVersion('4.2.0'):
652652
raise ValueError("You're using a version"
653653
" of BeautifulSoup4 (4.2.0) that has been"
@@ -658,7 +658,7 @@ def _parser_dispatch(flavor):
658658
" and later releases will work.")
659659
else:
660660
if not _HAS_LXML:
661-
raise ImportError("lxml not found please install it")
661+
raise ImportError("lxml not found, please install it")
662662
return _valid_parsers[flavor]
663663

664664

0 commit comments

Comments
 (0)