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

All file open functions should be changed to use the open pathlib method #71

Open
tjmills opened this issue Jun 26, 2018 · 1 comment
Open
Assignees
Labels
bug Something isn't working

Comments

@tjmills
Copy link

tjmills commented Jun 26, 2018

Since we are using pathlib.Path everywhere, we should use the bound pathlib.Path.open method to open files rather than the base pytohn open method.

The base python open method throws an error on pathlib.Path objects

TypeError: expected str, bytes or os.PathLike object, not PosixPath

@tjmills tjmills added the bug Something isn't working label Jun 26, 2018
@tjmills
Copy link
Author

tjmills commented Jun 26, 2018

dartclasses.py uses strings for filepaths, this should be changed to pathlib.Path objects.

e.g. https://github.com/NCAR/wrf_hydro_py/blob/master/wrfhydropy/core/dartclasses.py#L92

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants