Survey banner
The Dataiku Community is moving to a new home! New posts are now disabled and the community will shortly be in temporary read only mode: LEARN MORE

dkuSourceLibR() results in error

stephensunny
Level 3
dkuSourceLibR() results in error

Please see my attachments. I have a file called "run_MI.R" that is in the R folder within libraries. I try to call the file with dkuSourceLibR() but I get an error (attached). Please advise.

0 Kudos
7 Replies
AlexT
Dataiker

Hi Stephen,

Can you please confirm what version of DSS you are seeing this on?

This should be working in DSS 8.0.5 and later. 

0 Kudos
stephensunny
Level 3
Author

Version 9.0.3

0 Kudos
AlexT
Dataiker

Wasn't able to reproduce the issue on DSS 9.0.3

Can you please confirm

1) If project libraries and notebooks are in the same project

2) If you are running the notebook kernel locally, or is it containerized? 

 If there are we may need to have a closer look at your environment so I would suggest you raise a support ticket along with the instance diagnostics. 

I was able to reproduce the same error if I point to inexisting file but I get slightly different error. The search path also includes the project in my case :

e.g config/projects/PROJECT_ID/lib/R

 

0 Kudos
stephensunny
Level 3
Author

1) Project libraries and notebooks are in the same project

2) The kernel is containerized

I've asked a Dataiku rep for help. Thank you for trying.

0 Kudos
sampath
Level 1

Sorry, I know I am reopening an old post. But I am facing exactly the same error. The code is in my lib/R project library folder. Also I am able to use dkuSourceLibR in a R notebook which is loading the file okay.

 

Only with a Shiny app its throwing the error.

0 Kudos
AlexT
Dataiker

What DSS version are you currently on @sampath ?
There is a known issue in some DSS versions a fix is scheduled to be released in the next minor DSS version you can keep an eye on the https://doc.dataiku.com/dss/latest/release_notes/index.html and upgrade to 12.2.2 once available.

Thanks,

0 Kudos
AlexT
Dataiker
If you are blocked the workaround would be to use global libraries instead of the project's libraries or use a managed folder pointing to the R libraries and then referencing it in your webapp until the fix is available.

The steps would be as follows:

1. Create a managed folder that points to the R directory of your project lib. You can create a connection that points to DATADIR/config/projects/MYPROJECT/lib, then create a managed folder and set its settings like so:
 
 

NdxMxSwYp4mwaMXOgbU8NxfgrvYFO9PNWA (1).jpeg

 
2. Everything in your R directory will now dynamically show up in the managed folder:
-jRQtaPwhSM-3PaDTYCsdSKnkx1kTF1epQ.jpeg
 

 

 
3. Copy this managed folder to your webapp using dkuManagedFolderCopyFromLocal from your Rshiny code running locally or in a container:
 
w1j5V4a7kU_OyBBuvz0BRd_5x5sNMBuuIA.png
 
0 Kudos