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?
to your account
Would be nice if Image (and others?) would accept a pathlib.Path instance.
from pathlib import Path
fpath = Path('/media/bar/Lake_town-home.jpg')
Traceback (most recent call last):
File "/home/bar/.virtualenvs/foo/lib/python3.7/site-packages/wand/image.py", line 8762, in save
TypeError: filename must be a string, not PosixPath('/media/bar/Lake_town-home.jpg')
The text was updated successfully, but these errors were encountered:
It should! Or, perhaps, you located an area/method that does not. Could that error message be coming from another code-location then the one you posted? Just tested with Python 3.7 & 3.8 images load fine from PosixPath instances.
Sorry, something went wrong.
you're right, it's save that triggered the traceback.
Got it. 9d4ca66 should fix it.
Afaik it's not documented anywhere that Path's are accepted..
No branches or pull requests