[GRASS-user] t.rast.accdetect failing

Micha Silver tsvibar at gmail.com
Mon Jul 10 00:50:12 PDT 2017


Hello:

I'm trying to do pattern detection of an STRDS (hourly precipitation 
from radar images) with a cycle of 3 hrs. The last step, 
t.rast.accdetect errors as follows (after finishing to create the 
pattern rasters):

Traceback (most recent call last):
   File "/usr/lib/grass72/scripts/t.rast.accdetect", line 592, in <module>
ERROR: Unable to     main()
execute transaction:  File "/usr/lib/grass72/scripts/t.rast.accdetect", 
line 437, in main

INSERT INTO raster_base ( name ,creator ,mapset ,creation_time
,temporal_type ,id ) VALUES ('pat_2016_07_12_10' ,'micha' ,'micha'
,'2017-07-09 23:51:24.106063' ,'absolute' ,'pat_2016_07_12_10 at micha') ;
INSERT INTO raster_absolute_time ( start_time     ,idregister_null, 
empty_maps, dbif)
  ,end_time )  File "/usr/lib/grass72/scripts/t.rast.accdetect", line 
479, in create_strds_register_maps
  VALUES
('2016-07-12 10:00:00' ,'pat_2016_07_12_10 at micha' ,'2016-07-12 11:00:00') ;
INSERT INTO raster_spatial_extent ( north ,bottom ,west ,top ,proj ,east
,id ,south ) VALUES (-3758645.000000 ,0.000000 ,-523462.000000 ,0.000000
,'XY' ,376538.000000 ,'pat_2016_07_12_10 at micha' ,-4658645.000000) ;
INSERT INTO raster_metadata ( max ,rows     map.insert(dbif)
,min   File 
"/usr/lib/grass72/etc/python/grass/temporal/abstract_map_dataset.py", 
line 275, in insert
,datatype ,number_of_cells
,cols ,ewres ,nsres ,id ) VALUES (2.000000 ,900 ,1.000000 ,'CELL' ,810000
,900     return AbstractDataset.insert(self, dbif=dbif, execute=execute)
,1000.000000 ,1000.000000  File 
"/usr/lib/grass72/etc/python/grass/temporal/abstract_dataset.py", line 
405, in insert
  ,'pat_2016_07_12_10 at micha') ;
INSERT INTO raster_stds_register ( id ,registered_stds ) VALUES
('pat_2016_07_12_10 at micha' ,NULL) ;
     dbif.execute_transaction(statement)
   File "/usr/lib/grass72/etc/python/grass/temporal/core.py", line 1021, 
in execute_transaction
     return self.connections[mapset].execute_transaction(statement)
   File "/usr/lib/grass72/etc/python/grass/temporal/core.py", line 1315, 
in execute_transaction
     self.cursor.executescript(statement)
sqlite3.IntegrityError: UNIQUE constraint failed: raster_base.id

If I understand correctly, the 'id' (Primary Key) in raster_base is 
created from the raster name and mapset. So why am I getting this 
"UNIQUE constraint failed" error? Any tips?

Thanks, Micha

-- 
Micha Silver
Ben Gurion Univ.
Sde Boker, Remote Sensing Lab
052-3665918



More information about the grass-user mailing list