Skip to content

Commit 464cef8

Browse files
committedMay 12, 2023
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.
1 parent 4f9bdab commit 464cef8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎easy_abc.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -8368,7 +8368,7 @@ def restore_settings(self):
83688368
elif wx.Platform == '__WXGTK__':
83698369
try:
83708370
gs_path = subprocess.check_output(["which", "gs"])
8371-
settings['gs_path'] = unicode(gs_path[0:-1])
8371+
settings['gs_path'] = gs_path[0:-1].decode()
83728372
except:
83738373
settings['gs_path'] = ''
83748374
#1.3.6.1 [SS] 2014-01-13

0 commit comments

Comments
 (0)
Please sign in to comment.