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

parse_savename MethodError #361

Open
bgctw opened this issue Sep 29, 2022 · 1 comment
Open

parse_savename MethodError #361

bgctw opened this issue Sep 29, 2022 · 1 comment
Labels
bug Something isn't working help wanted The developers need some help here! savename Regarding creating "shorthand" names

Comments

@bgctw
Copy link

bgctw commented Sep 29, 2022

I try encoding symbols with DrWatson.jl savename.
The encoding works, but I have troubles getting the NamedTuple back from the encoded string, but only get MethodError on tryparse.

using DrWatson
slc = (site = :LUE, targetlim = :lim_P, scenario = (:prior_sep,))

tmp1 = DrWatson.savename(slc; allowedtypes=(Symbol, Tuple))
slc1 = DrWatson.parse_savename(tmp1, parsetypes = (Symbol, Tuple))

tmp2 = DrWatson.savename(slc; allowedtypes=(Symbol, Tuple), expand=["scenario"])
slc2 = DrWatson.parse_savename(tmp2, parsetypes = (Symbol, Tuple))

Since, I this is my first use of DrWatson, I think its just that I did not fully get the API yet, rather than a bug and posted this first at discourse.

How do I correctly specify the arguments to savename and parse_savename to make the example work for the example slc NamedTuple?
I am using Julia 1.8.1 and DrWatson v2.9.1.

@Datseris
Copy link
Member

Hm, I think parse_savename doesn't work with the expand option of savename.

@Datseris Datseris added bug Something isn't working help wanted The developers need some help here! savename Regarding creating "shorthand" names labels Sep 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted The developers need some help here! savename Regarding creating "shorthand" names
Projects
None yet
Development

No branches or pull requests

2 participants