Opened 9 years ago

Closed 8 years ago

#2590 closed defect (fixed)

t.create fails to create/overwrite a new strds

Reported by: Nikos Alexandris Owned by: grass-dev@…
Priority: normal Milestone: 7.0.0
Component: Temporal Version: svn-releasebranch70
Keywords: Cc:
CPU: Unspecified Platform: Unspecified

Description

The command

t.create type="strds" title="DMSP-OLS" description="Version 4 DMSP-OLS Nighttime Lights Time Series" output="ols"

works fine in G71 (trunk) but fails in G7. The relevant output is:

t.create type="strds" title="DMSP-OLS" description="Version 4 DMSP-OLS Nighttime Lights Time Series" output="ols"

works fine in G71 (trunk), it doesn't work in G7 (updated last night).

WARNING: Overwrite space time raster dataset <ols> and unregister all maps.
Traceback (most recent call last):
  File "/osgeo/src/grass7_release/dist.x86_64-unknown-linux-gnu/scripts/t.create", line 83, in <module>
ERROR: Unable to execute transaction:
--#############################################################################
-- This     main()
SQL script generates the table in which all registered GRASS_MAP  File "/osgeo/src/grass7_release/dist.x86_64-unknown-linux-gnu/scripts/t.create", line 79, in main

maps
-- are listed in.
--
--     semantic, None, grass.overwrite())
This table   File "/osgeo/src/grass7_release/dist.x86_64-unknown-linux-gnu/etc/python/grass/temporal/open_stds.py", line 169, in open_new_space_time_dataset
will be created for each STDS.
--
-- Author: Soeren Gebbert soerengebbert <at> googlemail <dot> com
--#############################################################################

-- SPACETIME_NAME is a placeholder for specific stds name (SQL compliant):
name_mapset
-- GRASS_MAP     sp.insert(dbif)
is a placeholder for specific map type: raster,  File "/osgeo/src/grass7_release/dist.x86_64-unknown-linux-gnu/etc/python/grass/temporal/abstract_space_time_dataset.py", line 366, in insert
 raster3d or
vector

-- This table stores the.ids of the GRASS_MAP maps registered in the
current spacetime GRASS_MAP table
CREATE TABLE SPACETIME_NAME_GRASS_MAP_register (
id VARCHAR NOT NULL, -- This colum is a primary key storing the registered
GRASS_MAP map.ids
PRIMARY KEY (id)
);
CREATE INDEX raster_map_register_dad84f0878c348b49cf467fc4a689a88_index ON
raster_map_register_dad84f0878c348b49cf467fc4a689a88 (id);INSERT INTO
strds_base ( name ,creator ,mapset ,creation_time ,modification_time
,temporal_type ,id ,semantic_type ) VALUES ('ols' ,'nik' ,'PERMANENT'
,'2015-02-18 13:00:57.586753' ,'2015-02-18 13:00:57.586764' ,'absolute'
,'ols@PERMANENT' ,'mean') ;
INSERT INTO strds_absolute_time ( start_time ,granularity ,id ,map_time
,end_time ) VALUES (NULL ,NULL ,'ols@PERMANENT' ,NULL ,NULL) ;
INSERT INTO strds_spatial_extent ( north ,bottom ,west ,top ,proj ,east ,id
,south ) VALUES (NULL ,NULL ,NULL ,NULL ,'XY' ,NULL ,'ols@PERMANENT' ,NULL)
;
INSERT INTO strds_metadata ( max_min ,description ,ewres_min ,title
,min_max ,nsres_min ,nsres_max ,number_of_maps ,raster_register ,command
,min_min ,ewres_max ,id ,max_max ,aggregation_type ) VALUES (NULL ,'test'
,NULL ,'test' ,NULL ,NULL ,NULL ,NULL
,'raster_map_register_dad84f0878c348b49cf467fc4a689a88' ,'# 2015-02-18
13:00:57
t.create type="strds" title="test" description="test"
output="ols" --o
' ,NULL ,NULL ,'ols@PERMANENT' ,NULL ,NULL) ;
    dbif.execute_transaction(statement)
  File "/osgeo/src/grass7_release/dist.x86_64-unknown-linux-gnu/etc/python/grass/temporal/core.py", line 955, in execute_transaction
    self.cursor.executescript(statement)
sqlite3.OperationalError: table SPACETIME_NAME_GRASS_MAP_register already exists

Change History (3)

comment:1 by lucadelu, 8 years ago

Is this ticket still valid?

comment:2 by veroandreo, 8 years ago

I would say no. Quite a lot has happened since 7.0.0. I just tested in both rel_branch and trunk recompiled today, works fine.

comment:3 by lucadelu, 8 years ago

Resolution: fixed
Status: newclosed

Please reopen if needed

Note: See TracTickets for help on using tickets.