Skip to content

Commit

Permalink
Fix determining gs_path on Linux. Fixes jwdj#66
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
sudobash1 committed May 12, 2023
1 parent 4f9bdab commit 464cef8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion easy_abc.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 464cef8

Please sign in to comment.