Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v0.9 archives with group extras not importable on aiida v1.4.2 #4560

Closed
ltalirz opened this issue Nov 12, 2020 · 5 comments · Fixed by #4561
Closed

v0.9 archives with group extras not importable on aiida v1.4.2 #4560

ltalirz opened this issue Nov 12, 2020 · 5 comments · Fixed by #4561
Assignees
Labels
Milestone

Comments

@ltalirz
Copy link
Member

ltalirz commented Nov 12, 2020

Describe the bug

subset.aiida is an export file created with the current develop branch (and includes group extras).

$ verdi import subset.aiida
Info: importing archive subset.aiida

IMPORT
--------  ------------
Archive   subset.aiida

Parameters
--------------------------  ------
Comment rules               newest
New Node Extras rules       import
Existing Node Extras rules  kcl
Error: an exception occurred while importing the archive subset.aiida
TypeError: string indices must be integers

Steps to reproduce

  1. Install aiida-core 1.4.2
  2. wget https://www.dropbox.com/s/0hm1y89d9go3533/subset_1.aiida?dl=1 -O subset.aiida
  3. verdi import subset.aiida

Note: The export file was created with a group containing extras.
I've created another export file that contains all the nodes of the group but not the group itself.
This export file imports fine on aiida 1.4.2.

@ltalirz
Copy link
Member Author

ltalirz commented Nov 12, 2020

As discussed with @chrisjsewell , this will be fixed by bumping the export file format to v0.10 (with a migration that does nothing).

@ltalirz
Copy link
Member Author

ltalirz commented Nov 12, 2020

Just as a final clarification:

As long as the groups exported do not contain extras, import on aiida v1.4.2 works fine.
The following change in the data.json makes the import choke under v1.4.2:

7c7,9
<             "extras" : {},
---
>             "extras" : {
>                "t" : 0
>             },

group_with_extra.zip
group.zip

@chrisjsewell
Copy link
Member

To clarify even further, it is due to the lack of these lines in 1.4.2:

if conversion_data == 'jsonb':
# we do not make any changes
return attributes_data

@ltalirz ltalirz added this to the v1.5.0 milestone Nov 12, 2020
@sphuber
Copy link
Contributor

sphuber commented Nov 13, 2020

Just for my understanding, the export file is importable on develop, i.e. what will become 1.5? And if so, are you suggesting that you want to create v1.4.4 with a patch fix?

@ltalirz
Copy link
Member Author

ltalirz commented Nov 13, 2020

Just for my understanding, the export file is importable on develop, i.e. what will become 1.5?

yes.

And if so, are you suggesting that you want to create v1.4.4 with a patch fix?

No. We will bump the export file format instead, i.e. export files with groups that contained extras, created from the aiida-core develop branch between Oct 28th 2020 and today will not be importable with aiida < 1.5
I think that is acceptable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants