From 3889770c38ba4e71326110812a5c44f120406cf1 Mon Sep 17 00:00:00 2001 From: Kelvin Rodriguez Date: Thu, 13 Dec 2018 17:12:31 -0700 Subject: [PATCH] better error, made travis install python lib --- .travis.yml | 1 + src/ale.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 4930abc..f119092 100644 --- a/.travis.yml +++ b/.travis.yml @@ -46,6 +46,7 @@ install: script: - PYTHONPATH=. pytest tests/pytests + - python setup.py install # install to use python lib in c code - mkdir build - cd build - cmake -DCOVERAGE=ON .. diff --git a/src/ale.cpp b/src/ale.cpp index c0dd3af..6e139f7 100644 --- a/src/ale.cpp +++ b/src/ale.cpp @@ -313,7 +313,7 @@ namespace ale { // Import the file as a Python module. PyObject *pModule = PyImport_Import(PyUnicode_FromString("ale")); if(!pModule) { - throw runtime_error(getPyTraceback()); + throw runtime_error("Failed to import ale. Make sure the ale python library is correctly installed."); } // Create a dictionary for the contents of the module. PyObject *pDict = PyModule_GetDict(pModule); -- GitLab