respec / HSPsquared

Hydrologic Simulation Program Python (HSPsquared)
GNU Affero General Public License v3.0
43 stars 17 forks source link

Error running intro script #87

Closed daspliff closed 2 years ago

daspliff commented 2 years ago

I am trying to run through the Intro_toHSP2.ipynb. I am able to link all directories/paths. I am able to process the HSPF inputs successfully

readUCI(input_uci_path, output_hdf5_path)....runs successfully readWDM(input_wdm_path, output_hdf5_path)...runs successfully

However when I try to run the HSP2 simulation for Test10: (main(output_hdf5_path, saveall=True)

I get : AttributeError: 'PosixPath' object has no attribute 'read_uci"

Any I dea how to resolve this error?

PaulDudaRESPEC commented 2 years ago

The development team modified the Intro_toHSP2.ipynb a few weeks ago to make it compatible with the current HSP2 code, after a recent enhancement (#68) for IO abstraction. I'm guessing you have the older .ipynb, and getting the most up-to-date one will fix the problem.

aufdenkampe commented 2 years ago

@daspliff, the fix is presently on our develop branch, so you can get it from there if you like.

In the meanwhile, thanks to your issue reminding us, we'll pull it into Master in the next few days and release v0.10.1 with this Pull Request:

daspliff commented 2 years ago

Thank you so much for your response. I switched to the development branch and can verify that the module now works.

aufdenkampe commented 2 years ago

Tutorials updated with 5ca8619.

The notebooks now recommend using a context manager for running HSP2.

We'll soon be moving all this into release v0.10.1, via PR #88.