diff --git a/dialogflow_task_executive/CMakeLists.txt b/dialogflow_task_executive/CMakeLists.txt index 5e66b261a..9db855ef9 100644 --- a/dialogflow_task_executive/CMakeLists.txt +++ b/dialogflow_task_executive/CMakeLists.txt @@ -71,7 +71,7 @@ elseif("$ENV{ROS_DISTRO}" STRGREATER "melodic") else() catkin_generate_virtualenv( INPUT_REQUIREMENTS requirements.in - PYTHON_INTERPRETER python2 + PYTHON_INTERPRETER python3 ) endif() diff --git a/dialogflow_task_executive/node_scripts/dialogflow_client.py b/dialogflow_task_executive/node_scripts/dialogflow_client.py index cb4253243..df562c9b7 100644 --- a/dialogflow_task_executive/node_scripts/dialogflow_client.py +++ b/dialogflow_task_executive/node_scripts/dialogflow_client.py @@ -117,7 +117,7 @@ def make_dialog_msg(self, result): # check if ROS_PYTHON_VERSION exists in indigo if (self.language == 'ja-JP' and ("ROS_PYTHON_VERSION" not in os.environ - or os.environ["ROS_PYTHON_VERSION"] == "2")): + or sys.version_info.major <= 2)): msg.query = result.query_text.encode("utf-8") msg.response = result.fulfillment_text.encode("utf-8") else: