Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Will not save .png form of file #26

Open
rwkopcke opened this issue Jan 9, 2020 · 0 comments
Open

Will not save .png form of file #26

rwkopcke opened this issue Jan 9, 2020 · 0 comments

Comments

@rwkopcke
Copy link

rwkopcke commented Jan 9, 2020

EDIT: After the installation of Ghostscript 9.50, which I obtained from
https://pages.uoregon.edu/koch/Ghostscript-9.50-Full.pkg,
the program writes the png file as expected on key "s" -- PIL requires the presences of Ghostscript, which is not provided with the purchase of a Mac.

Using python 3.8.1 and the current version of PIL:
on keys "t" or " ", the program toggles or restarts as expected.
on key "s", the program writes the .eps file, but it does not write the .png file. The program continues to run and produces the following error message when it fails to write the png file.

generating spirograph... saving drawing to spiro-09Jan2020-114601.eps/png Exception in Tkinter callback Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/tkinter/__init__.py", line 1883, in __call__ return self.func(*args) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/turtle.py", line 686, in eventfun fun() File "/Users/richardkopcke/PycharmProjects/Python_Playground/ch2_spirograph/original.py", line 191, in saveDrawing img.save(fileName + '.png', 'png') File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/PIL/Image.py", line 2068, in save self._ensure_mutable() File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/PIL/Image.py", line 589, in _ensure_mutable self._copy() File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/PIL/Image.py", line 582, in _copy self.load() File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/PIL/EpsImagePlugin.py", line 330, in load self.im = Ghostscript(self.tile, self.size, self.fp, scale) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/PIL/EpsImagePlugin.py", line 143, in Ghostscript subprocess.check_call(command, startupinfo=startupinfo) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/subprocess.py", line 359, in check_call retcode = call(*popenargs, **kwargs) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/subprocess.py", line 340, in call with Popen(*popenargs, **kwargs) as p: File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/subprocess.py", line 854, in __init__ self._execute_child(args, executable, preexec_fn, close_fds, File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/subprocess.py", line 1702, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename) FileNotFoundError: [Errno 2] No such file or directory: 'gs'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant