Ticket #494 (closed: fixed)

Opened 16 years ago

Last modified 15 years ago

Import TS dataset twice creates duplicate datasets

Reported by: villyc Owned by: administrator
Priority: normal Milestone: Ecopath 6: build 6.0.7
Component: Ecosim Version:
Severity: minor Keywords:


I read the csv file two times (without changing the file name). It made two versions of it (the second one listed with 0 time series); it should just overwrite the one with the same name. Looks like one has to delete old time series before reading a new with the same name, shouldnt be necessary.

Change History

comment:1 Changed 16 years ago by administrator

related to #410

comment:2 Changed 16 years ago by jeroens

Build unable to duplicate, tried several times with several CSV files in several models.

The existing implementation deletes any dataset with the same name prior to importing. After import there should be no remaining empty datasets drifting about. Please describe in detail how to reproduce the error if it occurs again.

comment:3 Changed 16 years ago by jeroens

After, an entire dataset can be deleted at once

comment:4 Changed 16 years ago by jeroens

Ok, fixed it after build prerelease.
This happened:

  • A database update forged a constraint between tables TSDataset and TS
  • SQL-created Foreign Key links do NOT cascade on delete so an existing dataset was not deleted

comment:5 Changed 16 years ago by carieh

Ok I am having an issue with this one
I imported a time series to my model, and then I deleted 1 of the groups in the time series (so I would know if it changed)
-then I imported the same time series again, and the number of groups did NOT change, so I would assume that the new time series data is NOT overwriting the original

comment:6 Changed 16 years ago by jeroens

Import issue fixed with 499

comment:7 Changed 16 years ago by carieh

Ha ha...
now when you try to import the same timeseries twice you crash the model...maybe it was better to have 2 of the same database :-)
I loaded my timeseries
-deleted 1 time series (so I would know the difference if there were 2 time series
-imported the original timeseries again
-you will see a freeze in the model
-it does eventually work (part of the time) sometimes it completely crashes the program
leave it to me to crash it :-)

comment:8 Changed 16 years ago by jeroens

*Sigh* let's see what's up now ;)

comment:9 Changed 15 years ago by jeroens

In build it seems to work; importing the same set twice causes no more strange side effects. I've made a series of fixes to the actual import logic; maybe this has improved matters? I cannot reproduce the issue.

comment:10 Changed 15 years ago by carieh

version now overwrites the csv of same name so there is only one allowed

Note: See TracTickets for help on using tickets.