respec / HSPsquared

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

Errors and Warnings in reading WDM File #10

Closed mishranurag closed 6 years ago

mishranurag commented 6 years ago

The Test10 uci and WDM files are in DataSources folder. They should be in the TutorialData folder.

Once I move these files to right places, I get following warnings and errors.

C:\Dev\HSPsquared\HSP2tools\uciReader.py:447: FutureWarning: convert_objects is deprecated.  To re-infer data dtypes for object columns, use DataFrame.infer_objects()
For all other conversions use the data-type specific converters pd.to_datetime, pd.to_timedelta and pd.to_numeric.
  df = df.convert_objects(convert_numeric=True)
C:\Users\Anurag.Mishra\AppData\Local\Continuum\Anaconda3\envs\Python2\lib\site-packages\IPython\core\interactiveshell.py:2717: FutureWarning: get_store is deprecated and be removed in a future version
HDFStore(path, **kwargs) is the replacement
  interactivity=interactivity, compiler=compiler, result=result)
    uciReader is Done
Processing WDM file TutorialData/TEST.WDM

AttributeError                            Traceback (most recent call last)
<ipython-input-4-75fb1fef8ffe> in <module>()
      1 HSP2tools.makeH5()
      2 HSP2tools.readUCI(uciname, unpackedhdfname)
----> 3 HSP2tools.ReadWDM(wdmname, unpackedhdfname)
      4 get_ipython().system(u'ptrepack {unpackedhdfname}  TutorialData\\tutorial.h5')

C:\Dev\HSPsquared\HSP2tools\wdmReader.pyc in ReadWDM(wdmfile, hdffile, **options)
     43         m = re.search(pat, row.SVOLNO)
     44         key = int(m.group(2))
---> 45         if not WDM.exists_dsn(wdmname, key):
     46             continue
     47 

AttributeError: 'WDM' object has no attribute 'exists_dsn'
mishranurag commented 6 years ago

Since the qrids.enable() command didn't work, the tutorial reset command also didn't work. Reordering qgrids.enable to bottom line helped in resetting tutorial files.

Additionally, WDMTOOLBOX does not provide version number.

JasonLoveRespec commented 6 years ago

As you indicate, your qgrid call is crashing, thus if your the subsequent call to HSP2tools.reset() which creates a clean version of the tutorial's data folder by copying master data source folder subsequently never occurs. Make sure your install of Qgrid works.

Hopefully when you get Qgrid working (or comment out and use regular dataftrames from pandas) you will see WDM toolbox version is Tim Cerra's 0.8.2 MOD RTH (this has been tweked by Robert Heaphy).

image

JasonLoveRespec commented 6 years ago

It would seem however from your description of no WDMToolbox version and since its failing on HSP2.ReadWDM that you likely also have an issue beyond qgrid with the WDMToolbox module.

mishranurag commented 6 years ago

I installed WDMToolbox using

  pip install wdmtoolbox

long before I attempted HSPsquared. I have tested it independently and it seems to have worked in the past.

Not sure how to update or change my current version wdmtoolbox. I will try it some more.

mishranurag commented 6 years ago

I uninstalled wdmtoolbox and then restarted the kernel. The wdmtoolbox issues are resolved now. Thanks.