diff --git a/spyderlib/widgets/variableexplorer/utils.py b/spyderlib/widgets/variableexplorer/utils.py index 4116ef6ff6a..9f450d92c60 100644 --- a/spyderlib/widgets/variableexplorer/utils.py +++ b/spyderlib/widgets/variableexplorer/utils.py @@ -98,7 +98,7 @@ def get_numpy_dtype(obj): try: import bs4 NavigableString = bs4.element.NavigableString -except ImportError: +except (ImportError, AttributeError): NavigableString = FakeObject # analysis:ignore