Closed Vilax closed 5 years ago
More info: this happens with import volumes, because the import volume protocol has an attribute, outputVol, with an absolute path.
also all volumes (Set) are imported with absolute paths.
Yep, maybe we could remove the absolute path in the output...I have sometimes thought if for volumes we activate the "Copy files" option to True by default. @azazellochg What do you think?
I've fixed it just by making it relative, regardless copy or linking
Wait, wait. I still don't get it. If you are importing a volume outside the project, how the project renaming affect the abs link?
On Tue, Feb 26, 2019, 7:43 AM Pablo Conesa notifications@github.com wrote:
I've fixed it just by making it relative, regardless copy or linking
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/I2PC/scipion/issues/1935#issuecomment-467316308, or mute the thread https://github.com/notifications/unsubscribe-auth/AIDPWO1Blsdmvfi89QhTb3naaBj4TuKaks5vRNeHgaJpZM4bJWMV .
Because the filename for the volume object stored was absolute.
Imported volumes point files/links at import's extra folder
I still don't get it. I guess that if you import a volume from location: /x/y/z/volume.mrc The, in the extra folder, a link is created to /x/y/z/volume.mrc, independently of the location/name of the importing project. If you rename the project, I can't see how this affect the abs link.
@delarosatrevin yes, the link created in extra folder still works after renaming, the problem is here: https://github.com/I2PC/scipion/blob/release-2.0.0-fixes/pyworkflow/em/protocol/protocol_import/volumes.py#L152
In general, I agree that simply renaming the protocol should not affect its self-consistency.
The problem will happen is we import from somewhere inside the project.... will that break the link?
Importing from the same project...usually means that there is some relevant output that we are not giving users the way to register it (via viewers, etc). If it is from another project, then it comes down as importing from an external folder, we don't have way to control if you rename a folder in the the filesystem after an import.
I have a big relion project, I'll try to rename it and see what breaks ;) All imports etc seems to work after renaming, except import volume
I know, I was just thinking that if the "imports" from inside are linked relative...renaming will not break those links
Yes, imports are a bit troublesome...I remember we had discuss in the past and in some cases absolute seems better, but relative in other cases.
When a project is renamed, the protocols keep the old path, and when they are relaunched they cannot find the path.