You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I attach an aiida export file (2.3MB, created with aiida-core 0.12.1). It contains a few CifData, ParameterData and Workfunction nodes.
Importing it the first time works fine
verdi import test-db.tar.gz
...
STORING NODE LINKS...
(600 new links...)
STORING GROUP ELEMENTS...
IMPORTED NODES GROUPED IN IMPORT GROUP NAMED '20180702-173341'
*** WARNING: MISSING EXISTING UUID CHECKS!!
*** WARNING: TODO: UPDATE IMPORT_DATA WITH DEFAULT VALUES! (e.g. calc status, user pwd, ...)
DONE.
Importing it the second time, however, yields an error:
verdi import test-db.tar.gz
...
STORING NEW NODE FILES & ATTRIBUTES...
SETTING THE IMPORTED STATES FOR NEW NODES...
existing aiida.backends.djsite.db.models.DbGroup: 6e9ce2ff-8e6c-4a66-994c-72281b923c61 (8->1)
STORING NODE LINKS...
Rolling back
Traceback (most recent call last):
File "/Users/leopold/Applications/miniconda3/envs/cof-paper/lib/python2.7/site-packages/aiida/cmdline/commands/importfile.py", line 85, in run
import_data(filename)
File "/Users/leopold/Applications/miniconda3/envs/cof-paper/lib/python2.7/site-packages/aiida/orm/importexport.py", line 316, in import_data
silent=silent)
File "/Users/leopold/Applications/miniconda3/envs/cof-paper/lib/python2.7/site-packages/aiida/orm/importexport.py", line 1325, in import_data_sqla
.format(out_id, link['label'], in_id))
ValueError: There exists already an input link to node 1 with label _return but it does not come the expected input 8
> There has been an exception during the import of file
> test-db.tar.gz
> Do you want to continue (c) or stop (S, default)? c
I see a few issues here, in number of decreasing importance:
Unless somebody can convince me otherwise, I believe importing an export file twice should not yield any error
After replying "c" to the prompt, there is no output anymore. The user is left wondering what happened - what was imported, what wasn't ... At the very least, the exception error message needs to be forwarded, probably with some additional info on what is done after the exception occurred (if anything)
verdi import needs a --non-interactive option which does not prompt
I believe the error message was meant to say ... but it does not come from the expected input 8
The text was updated successfully, but these errors were encountered:
Thanks @ltalirz
I agree that consecutive attempts to import the same file should fail silently (i.e. import the delta that is not imported if there is an overlap and ignore the rest). Of course, if there are rules that are violated (e.g. a node is returned by two jobcalculations) then an error should be thrown but this should not be the case if you import the same file twice.
I think, that it is better to finish the work at #1102 which should be close to the end (that will also affect the behaviour of this issue and then focus on this).
This should be very likely be fixed by pull request #1764 for the issue #1758.
During the tests for #1758, some export files were imported more than once (by accident) and no exceptions occurred.
In any case after pull request #1764 is merged, we have to ensure that this is fixed with a final test.
I attach an aiida export file (2.3MB, created with aiida-core 0.12.1). It contains a few CifData, ParameterData and Workfunction nodes.
Importing it the first time works fine
Importing it the second time, however, yields an error:
I see a few issues here, in number of decreasing importance:
verdi import
needs a--non-interactive
option which does not prompt... but it does not come from the expected input 8
The text was updated successfully, but these errors were encountered: