8000 Allow pathlib Path/PosixPath as model_spec · Issue #98 · sot/xija · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Allow pathlib Path/PosixPath as model_spec #98

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

Closed
jeanconn opened this issue Oct 12, 2020 · 3 comments · Fixed by #99
Closed

Allow pathlib Path/PosixPath as model_spec #98

jeanconn opened this issue Oct 12, 2020 · 3 comments · Fixed by #99

Comments

@jeanconn
Copy link
Contributor

It looks like:

model_spec = json.load(open(model_spec, 'r'))

only allows model_spec files as string filenames.

@taldcroft
Copy link
Member

The problem is actually here:

if isinstance(model_spec, six.string_types):

@jeanconn
Copy link
Contributor Author
jeanconn commented Oct 12, 2020

Right, I saw that and understood the reason why, but should have linked the line up for clarity.

@jeanconn
Copy link
Contributor Author

And then a question about if six should be removed, if this should be handled with a try-to-read or some such, or if the user should just do what I did in my dev perigee_health_plots and str(PosixPath).

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

Successfully merging a pull request may close this issue.

2 participants
0