-
Notifications
You must be signed in to change notification settings - Fork 13
Description
@denvaar here's what I'm trying. I have Jeff's ODM2.sqlite db for the Little Bear River, with a single timeseries result. I'm trying to run Examples/Sample.py. I was hoping it would work!
I can connect to (read) the database, and query some objects. But I'll jump to the core and major problem I'm running into.
FYI, the sqlite db only has 1 result. No sweat. I run this statement tsResult = read.getTimeSeriesResultByResultId(1) in line 130. The resulting object matches closely the table definition of TimeSeriesResults. But it's clear that in Sample.py what's expected is an object that includes the associated Results; for example, there are statements like these:
tsResult.ResultTypeCV
tsResult.ProcessingLevelObj.DefinitionBut tsResult doesn't have any of those Results properties.
Ok, moving on, I try to get the time series result values, like this: tsValues = read.getTimeSeriesResultValuesByResultId(1). It doesn't work, and returns None.
read.getResultById(1) does return the single Results record.
The sqlite database looks fine to me, when I inspect its tables via a SQLite browser.
I also have other problems that seem puzzling. For example, read.getAllAffiliations() returns None, not the affiliations record.
Note that I'm not running Sample.py in full. I'm taking each distinct block and running it in a Jupyter notebook. I'm skipping the "add sampling feature" block, b/c I'm not interested in writing to the database at this time.
Thanks!