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

Support pathlib paths throughout pygeoprocessing #286

Open
phargogh opened this issue Dec 8, 2022 · 0 comments
Open

Support pathlib paths throughout pygeoprocessing #286

phargogh opened this issue Dec 8, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@phargogh
Copy link
Member

phargogh commented Dec 8, 2022

This is one of those things where python's dynamic typing creates a little more work for us as maintainers.

Since python 3.4, the standard library has included pathlib, which provides an object hierarchy representing paths on various operating systems. GDAL requires a string, and if a pathlib.Path object is provided, an exception is raised. Fortunately, pygeoprocessing's docstrings are pretty clear that a str is required so this isn't a bug.

The workaround right now is to simply cast your path to a string before you call pygeoprocessing functions.

@phargogh phargogh added the enhancement New feature or request label Dec 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant