diff --git a/jedi/api/__init__.py b/jedi/api/__init__.py index 3bf49843..4f10b0f2 100644 --- a/jedi/api/__init__.py +++ b/jedi/api/__init__.py @@ -618,7 +618,7 @@ class Interpreter(Script): for n in old: try: namespaces.append(getattr(n, p)) - except AttributeError: + except Exception: pass completion_names = [] diff --git a/test/test_api/test_interpreter.py b/test/test_api/test_interpreter.py index 36d85ecb..ef2262d4 100644 --- a/test/test_api/test_interpreter.py +++ b/test/test_api/test_interpreter.py @@ -80,3 +80,13 @@ class TestInterpreterAPI(TestCase): foo = Foo() self.check_interpreter_complete('foo[0].', locals(), []) + + def test_property_error(self): + class Foo(): + @property + def bar(self): + raise ValueError + + foo = Foo() + self.check_interpreter_complete('foo.bar', locals(), ['bar']) + self.check_interpreter_complete('foo.bar.baz', locals(), [])