sbg / sevenbridges-r

Seven Bridges API Client, CWL Schema, Meta Schema, and SDK Helper in R
https://sbg.github.io/sevenbridges-r/
Apache License 2.0
35 stars 14 forks source link

R API issues with Cavatica #51

Closed ihelbig closed 7 years ago

ihelbig commented 7 years ago

When I follow the tutorial for the R API in sbg (adapted for Cavatica, http://docs.sevenbridges.com/v1.0/reference#api-r-library, I get the following error Error in envRefSetField(.Object, field, classDef, selfEnv, elements[[field]]) : when creating a task (see screenshot).

This prevents the tsk object from being created. The task is still running, but I get this error message each time I handle the tsk object and it’s not possible to download it.

Any idea of what is happening there? screen shot 2017-02-15 at 11 17 00 pm

nanxstats commented 7 years ago

@ihelbig - thanks for reporting, we are now investigating this issue, will keep you posted. -Nan

ihelbig commented 7 years ago

@road2stat - thank you for looking into this! We wanted to use R for training purposes for our fellows and this is the main reason that I would like to work with the API - we're planning to connect this to a R-Jupyter notebook for reproducibility.

tengfei commented 7 years ago

@ihelbig thanks for reporting the bug, I just fixed it in github, could you please try install the github version here to see if the new fix works for you, and let us know. So we will update bioconductor version as well.

The reason is:

Cavatica API server may recently add more information (created_time field) to Task object, we defined some objects in R client with strict fields and types, so sometimes it may fail to create an object after an update from server side.

As a R client, I will think about to make it more flexible so instead of throwing errors, I may drop fields with warning so you can still have a working object (e.g. Task object)

ihelbig commented 7 years ago

Just another quick issue - when I try tsk$download, I get another error message. tsk$download('~/Downloads') downloading: Error: attempt to apply non-function

screen shot 2017-02-16 at 8 30 04 pm

tengfei commented 7 years ago

looks like the first issue is fixed, for this new issue I think your task just started and not finished, that's why "outputs" from your task is empty, you can also check in GUI, you will see that task is still running. When task finished or when some output files generated, you could use download function to download output files.

But thanks for reporting, we will change the message, to make it more clear, that output file doesn't exist yet ..

ihelbig commented 7 years ago

I am not sure whether this is the case? The task is finished and completed. I tried again this morning, but it shows me a message : Completed ?

nanxstats commented 7 years ago

The task creation issue caused by the recently introduced field created_time in API has been fixed by https://github.com/sbg/sevenbridges-r/commit/d39deabc6484dc572c17725f657639dc705e250d . Thanks @ihelbig for reporting this. There will be a new release version (release v1.4.8, devel v1.5.8) available on Bioconductor this week containing this update. In the same time, please feel free to install and test the latest development version on GitHub.

As for the possible task download problem, I've created another issue for further investigation: https://github.com/sbg/sevenbridges-r/issues/52 and will close this one for now.