Closed vks01 closed 8 years ago
16b4cc8216f933110bca54224245a8b026221e6b should fix it. I'll merge it to the master branch after you confirm. You still won't be able to finish the DSSAT simulation since you need to add some soil information (user-defined). We only have them over Africa currently for a project, so you can try using the same with
wget https://googledrive.com/host/0B-cBXVuysNV1TXVYd1BwSE05Zlk/dssat_soils.sql.gz
gunzip dssat_soils.sql.gz
./bin/psql -d rheas -f dssat_soils.sql
I tried to do a clean install on my linux box - I downloaded the code, manually edited the buildout.cfg file to include your last edit. But, when I tried to run "python bootstrap.py", I get the following error:
---ERROR----
Downloading https://pypi.io/packages/source/s/setuptools/setuptools-24.0.0.zip
Extracting in /tmp/tmpjEness
Now working in /tmp/tmpjEness/setuptools-24.0.0
Building a Setuptools egg in /tmp/tmpeGnPIS
Traceback (most recent call last):
File "setup.py", line 21, in
This seems unrelated to the table column missing. What's your distro and python version? Python 2.7 should work assuming that you have installed the requirements (see https://travis-ci.org/nasa/RHEAS/builds/141863922).
It is Python 2.7.6 running on Ubuntu 14.04.4 LTS (GNU/Linux 3.19.0-64-generic i686)...I'm trying to retrace my steps to see what happened - this was working (I could atleast run VIC) till I edited the buildout.cfg file and tried to re-install RHEAS..
It turns out, if I force bootstrap.py to use setup-tools version 23.2.0, the setup runs fine. When I run buildout, it goes off an updates setup-tools to version 24.0.2, but looks like something in bootstrap.py does not like 24.0.2. I got everything to work - however, if I use the basin.shp file in the example, I get the following warning, after which execution ends.
--WARNING----
basin.agareas.geom SRID:4326 TYPE:MULTIPOLYGON DIMS:2 (1 row)
INSERT 0 1 CREATE INDEX COMMIT ANALYZE WARNING! No crop areas found!
-----WARNING END --------
Are you using the same config file as in the documentation?
Yes.
I was following the steps in the 'Running a nowcast' example on ReadDocs. When I try to run the DSSAT portion of the nowcast, I get the following error:
-----ERROR-----------------
dropgeometrycolumn
basin.agareas.geom effectively removed. (1 row)
DROP TABLE BEGIN CREATE TABLE ALTER TABLE
addgeometrycolumn
basin.agareas.geom SRID:4326 TYPE:MULTIPOLYGON DIMS:2 (1 row)
INSERT 0 1 CREATE INDEX COMMIT ANALYZE ERROR: column "type" does not exist at character 102 STATEMENT: select st_value(rast,st_geomfromtext('POINT(35.125 1.125)',4326)) as doy from crops.plantstart where type like 'maize' and st_intersects(rast,st_geomfromtext('POINT(35.125 1.125)',4326)) order by doy Traceback (most recent call last): File "./rheas", line 16, in
sys.exit(rheas.run())
File "/home/ksriniva/RHEAS/src/rheas.py", line 81, in run
nowcast.execute(dbname, options)
File "/home/ksriniva/RHEAS/src/nowcast.py", line 197, in execute
runDSSAT(dbname, options)
File "/home/ksriniva/RHEAS/src/nowcast.py", line 182, in runDSSAT
model.run(dssatexe)
File "/home/ksriniva/RHEAS/src/dssat.py", line 729, in run
plantdates = self._planting(lat, lon)
File "/home/ksriniva/RHEAS/src/dssat.py", line 581, in _planting
cur.execute(sql)
psycopg2.ProgrammingError: column "type" does not exist
LINE 1: ...1.125)',4326)) as doy from crops.plantstart where type like ...
-----ERROR END --------------