From 41e9e9bdeebe7e0d25e412d1bbfd57f49171bb9e Mon Sep 17 00:00:00 2001 From: jbrockmendel Date: Fri, 22 Nov 2019 07:31:18 -0800 Subject: [PATCH] CLN: catch ValueError instead of Exceeption (#29785) --- pandas/io/html.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/io/html.py b/pandas/io/html.py index ed2b21994fdca..5f38f866e1643 100644 --- a/pandas/io/html.py +++ b/pandas/io/html.py @@ -896,7 +896,7 @@ def _parse(flavor, io, match, attrs, encoding, displayed_only, **kwargs): try: tables = p.parse_tables() - except Exception as caught: + except ValueError as caught: # if `io` is an io-like object, check if it's seekable # and try to rewind it before trying the next parser if hasattr(io, "seekable") and io.seekable():