PlumberDeploy Issue Saving Python Script to Source

Hello, I'm looking to run some Python reticulate code through my plumber API but running into a weird issue saving my Python script. I'm using plumberDeploy so I'm on Digital Ocean. I was able to install Python, reticulate, and some Python libraries all without issues, and I can run the py_run_string command through my R plumber API. But of course it's more ideal to source an actual Python script, and that's what I have been trying to do. I went into the Digital Ocean droplet console, and went to the working directory where the plumber.R file is saved (also the result of running getwd() through my API), and I'm attempting to save a Python script, but for some reason and mechanism that I do not understand it is getting deleted, see screenshot below:


From the screenshot you can see I successfully create the new file add.py. But then I try the API sourcing the script and get the ambiguous 500 error (I saw the post about logs, but I couldn't get it to work), and then somehow the file disappears from the location where it was (as you can see towards the bottom).

Sorry if I'm missing something obvious here. Any thoughts on what I may be doing wrong? Any advice on sourcing a Python script when using plumberDeploy?

Thank you!
Ricky

put the script in the same folder as your api, deploy the folder?

It is, but I don't understand why my Python script gets deleted automatically. See end of screenshot, add.py is there, but when I leave the folder and immediately come back it's disappeared. I set it up with plumberDeploy which took care of the backend, but it's the correct folder - the issue is it's getting deleted for some reason that I do not understand.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.