Task #8031
closedProblem with interaction Workspace - RStudi
100%
Description
I am trying to upload a file from my R Studio session to my workspace (VRE Tuna Atlas)
However, it does not work. It seems that the script is looping infinitely (see attached). The file is not loaded into my workspace.
Do you have an idea why?
Files
Updated by Roberto Cirillo over 8 years ago
- Status changed from New to In Progress
- Assignee changed from Andrea Dell'Amico to Roberto Cirillo
Updated by Roberto Cirillo over 8 years ago
- Category set to Application
Maybe the problem here could be the file name.
I see from HomeLibrary logs the following:
07.04.2017 10:27:54.917 [http-bio-8080-exec-66662] *ERROR* org.gcube.common.homelibrary.jcr.workspace.JCRWorkspace - The name Transform/IOTC/IOTC_functions.Rcontains illegal chars or is empty 07.04.2017 10:27:54.929 [http-bio-8080-exec-66662] *ERROR* org.apache.jackrabbit.j2ee.workspacemanager.servlets.rest.Upload - Error saving inpustream for file: null
If possible, could you try to rename the file removing the "/" char and retry, please?
Updated by Paul Taconet over 8 years ago
Thanks. It worked when I set the R working directory to the folder of the dataset I needed to upload.
One additional question: when I replace a file that previously existed in the WS (using overwrite<-T ), the public URL for this file changes. Is there a way to keep the same URL?
Updated by Roberto Cirillo over 8 years ago
- Assignee changed from Roberto Cirillo to Valentina Marioli
Please @valentina.marioli@isti.cnr.it could you reply to Paul's question?
Updated by Valentina Marioli over 8 years ago
Paul, what file did you replace? So, I can check why the public URL has been changed.
Updated by Paul Taconet over 8 years ago
The file is /Home/paultaconet/Workspace/Tuna_Atlas/R_scripts/Transform/IOTC/IOTC_functions.R
However, my question is more generic: let's say I have a file on the WS. I upload it in R, modify it, and the load it back in the WS. At that point, I have noted that the public URL changes; however, I would like that it remains the same as before. Is this operation possible?
Updated by Valentina Marioli over 8 years ago
If you overwrite a file, the public link does not change.
I'm checking the logs: the file "/Home/paultaconet/Workspace/Tuna_Atlas/R_scripts/Transform/IOTC/IOTC_functions.R" was created, removed and created again. That's why the public link has been changed.
Maybe the function "overwrite<-T" removes the file if it already exists.
Updated by Paul Taconet over 8 years ago
Actually yes, the function "overwrite<-T" removes the file. But with "overwrite<-F" I get an error message saying that the file is already present in the WS. So I guess from R it is not possible to overwrite a file without removing it first. @gianpaolo.coro@isti.cnr.it I think it would be nice to add this option!
Updated by Gianpaolo Coro over 8 years ago
That's because the Workspace application did not support a real overwrite up to some weeks ago. Now that the remote files are versioned we can change it.
Updated by Paul Taconet over 8 years ago
Ok, thanks. It would be very useful indeed!
Updated by Pasquale Pagano over 8 years ago
- Tracker changed from Support to Task
Can you report the status of this activity and what is missing to close this issue?
Updated by Valentina Marioli over 8 years ago
- Status changed from In Progress to Closed
- % Done changed from 0 to 100
I think we can close this ticket and I'm going to open a new ticket to improve the REST API in order to overwrite a file when the user uploads a file with the same name.