From 4469e654aee100f84df7a9574361723c86c85c20 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Sat, 9 May 2015 23:05:30 +0200 Subject: [PATCH] find_module_py33: use str(e) with ValueError ValueError has no message attribute. Fixes https://github.com/davidhalter/jedi/issues/584 --- jedi/_compatibility.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jedi/_compatibility.py b/jedi/_compatibility.py index 1a1e943f..60c9dcb5 100644 --- a/jedi/_compatibility.py +++ b/jedi/_compatibility.py @@ -25,7 +25,7 @@ def find_module_py33(string, path=None): except ValueError as e: # See #491. Importlib might raise a ValueError, to avoid this, we # just raise an ImportError to fix the issue. - raise ImportError("Originally ValueError: " + e.message) + raise ImportError("Originally ValueError: " + str(e)) if loader is None: raise ImportError("Couldn't find a loader for {0}".format(string))