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

swn can only be assigned once? #31

Closed
wkitlasten opened this issue Sep 9, 2021 · 1 comment · Fixed by #32
Closed

swn can only be assigned once? #31

wkitlasten opened this issue Sep 9, 2021 · 1 comment · Fixed by #32
Milestone

Comments

@wkitlasten
Copy link
Contributor

I just pulled from main to make sure I was updated and started getting the following error after trying to load the pickle. Thoughts?

ngwf = swn.SwnMf6.from_pickle(ppth,gwf)
File "d:\modelling\surface-water-network\swn\modflow\_base.py", line 126, in from_pickle
    obj.swn = swn

  File "d:\modelling\surface-water-network\swn\modflow\_base.py", line 152, in swn
    raise AttributeError("swn property can only be set once")

AttributeError: swn property can only be set once
@mwtoews
Copy link
Owner

mwtoews commented Sep 10, 2021

Aha, I just got caught by this one too. It's a misleading message, which needs to be fixed to close this issue. The reason why is that I've changed the arguments. Try this:

ngwf = swn.SwnMf6.from_pickle(ppth, model=gwf)

or if you have a SurfaceWaterNetwork object n:

ngwf = swn.SwnMf6.from_pickle(ppth, n, gwf)

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

Successfully merging a pull request may close this issue.

2 participants