Project

General

Profile

Actions

Support #4863

closed

Problem with SAI CATCHES_BY_GEAR algorithm

Added by Paul Taconet almost 9 years ago. Updated almost 9 years ago.

Status:
Closed
Priority:
Normal
Category:
-
Start date:
Aug 22, 2016
Due date:
% Done:

100%

Estimated time:
Infrastructure:
Development

Description

The output folder of the algorithm is empty, while the computation is successful. Everything works fine in R Studio.


Files

Actions #1

Updated by Gianpaolo Coro almost 9 years ago

Please, refer to the FAQs, because this is a known issue: https://wiki.gcube-system.org/gcube/Statistical_Algorithms_Importer:_FAQ

Actions #2

Updated by Paul Taconet almost 9 years ago

Thanks for the answer. However, the name of the output seems fine. Here are the last lines of the script:

setwd(working_directory_init)
zip_namefile_random <- paste("outputPlot","",Sys.time(),".zip ",sep="")
zip_namefile <- zip_namefile_random
zip_namefile <- sub(pattern = ":", replacement = "-", x = zip_namefile)
zip_namefile <- sub(pattern = ":", replacement = "-", x = zip_namefile)
zip_namefile <- sub(pattern = " ", replacement = "
", x = zip_namefile)
zip(zip_namefile, files=c(indicator), flags= "-r9X", extras = "",zip = Sys.getenv("R_ZIPCMD", "zip"))

Actions #3

Updated by Gianpaolo Coro almost 9 years ago

The switch of the working directory makes the code prone to errors. Please, try to do the following to understand what's happening:

1 - add a cat() instruction to log the full path of the produced file and log a check of existence for the file in working_directory_init/zip_namefile
2 - add a erroneous command at the end of the code to generate an error
3 - download and read the logs after the execution of the algorithm

As a general rule, you should generate an error if the file was not produced by the algorithm due to some error in the execution.
If you cannot understand the issue from the log, please share the SAI folder with me. I guess the issue could be in the indicator variable.

Actions #4

Updated by Paul Taconet almost 9 years ago

Thanks for the answer.
I added some cat instructions and repackaged the algorithm, adding a voluntary error. The log file does not give me any error, except the voluntary one (enclosed).

I tried to share the folder but I get the following error: "The selected item is not shareable because an ancestor item is already shared".

Actions #5

Updated by Gianpaolo Coro almost 9 years ago

Sorry Paul, I don't see a log containing the full path of the produced file. I see only checks that a certain line of code has been reached.
In summary, I think the issue is that either the zip file is not really created or the path where it has been created is wrong (not really the initial path).
You should check and display this information in the logs.
The issue in sharing the folder with me is that perhaps you are working in a sub-folder of a folder that is already shared with me. Could you tell me the path of your project, please?

Actions #6

Updated by Paul Taconet almost 9 years ago

The folder is "Tuna_Atlas" and the subfolder is "catches_by_gear"

Actions #7

Updated by Paul Taconet almost 9 years ago

  • Status changed from New to Closed

The algorithm was actually working but the execution didn't send back the output because of an extra blank at the end of the output file name (like ".zip ").
zip_namefile_random <- paste("outputPlot","_",Sys.time(),".zip ",sep="")
By luck we noticed that but it would help us a lot if we could read extra error messages to guide us.

Thanks a lot for the help

Actions #8

Updated by Gianpaolo Coro almost 9 years ago

Great guys!

Actions #9

Updated by Pasquale Pagano almost 9 years ago

  • Target version deleted (gCube related support)
Actions

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 8.91 MB)