From 464cef8080dba4e302fb26aff6dfae34c2a10925 Mon Sep 17 00:00:00 2001 From: Stephen Robinson Date: Fri, 12 May 2023 14:59:14 -0700 Subject: [PATCH] Fix determining gs_path on Linux. Fixes #66 When running EasyABC for the first time under Linux, it tries to determine the path to gs from the output of `which gs`. However, in python3, it returns a bytestring. EasyABC is expecting a str. Simply adding .decode() fixes the issue. The unicode() call is a remnant from python2 and can be removed. --- easy_abc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easy_abc.py b/easy_abc.py index 372fcf7..d55caf0 100644 --- a/easy_abc.py +++ b/easy_abc.py @@ -8368,7 +8368,7 @@ def restore_settings(self): elif wx.Platform == '__WXGTK__': try: gs_path = subprocess.check_output(["which", "gs"]) - settings['gs_path'] = unicode(gs_path[0:-1]) + settings['gs_path'] = gs_path[0:-1].decode() except: settings['gs_path'] = '' #1.3.6.1 [SS] 2014-01-13