jwdj / EasyABC

EasyABC
GNU General Public License v2.0
87 stars 36 forks source link

Export to PDF fails in 1.3.8.7 #85

Closed markblinkhorn closed 6 months ago

markblinkhorn commented 6 months ago

Running easy_abc.py under Python 3.11.2 on Raspberry Pi 5 Bookworm. Export to PDF fails with following Traceback:

Traceback (most recent call last): File "/home/markb/EasyABC/easy_abc.py", line 5530, in export_tunes success = self.export_tune(tune, file_type, extension, convert_func, path, show_save_dialog=individual_save_dialog) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/markb/EasyABC/easy_abc.py", line 5455, in export_tune if convert_func(tune, filepath): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/markb/EasyABC/easy_abc.py", line 5200, in export_pdf pdf_file = AbcToPDF(self.settings, tune.abc, tune.header, self.cache_dir, self.settings.get('abcm2ps_extra_params', ''), ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/markb/EasyABC/easy_abc.py", line 945, in AbcToPDF stdout_value, stderr_value, returncode = get_output_from_process(cmd2) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/markb/EasyABC/easy_abc.py", line 360, in get_output_from_process process = subprocess.Popen(cmd, stdin=stdin_pipe, stdout=subprocess.PIPE, stderr=subprocess.PIPE, creationflags=creationflags, cwd=cwd, bufsize=bufsize) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/subprocess.py", line 1024, in __init__ self._execute_child(args, executable, preexec_fn, close_fds, File "/usr/lib/python3.11/subprocess.py", line 1901, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename) FileNotFoundError: [Errno 2] No such file or directory: "b'/usr/bin/gs'"

Note the 'b' prefix in the path to ghostscript - /usr/bin/gs does exist.

Worked around by hard-coding the path to gs @ line 5202 of easy_abc.py

markblinkhorn commented 6 months ago

It would seem this is a self-inflicted injury due to heavy-handed editing. Closing for now, will only re-open if it re-surfaces...

Oops