Execute File Handling Python Script from UiPath Studio

I’m trying to simply run a file handling python script from UiPath. But it’s not working. Can someone give any suggestions.

Hi @raviranjan, try below two activities w.r.t python - load python script and run python script.


Load Python Script

UiPath.Python.Activities.LoadScript Enables you to store the handlers of a Python script in a PythonObject variable. You can use the resulting variable to invoke the methods within the code. If there is inline code besides the methods present in…


Run Python Script

UiPath.Python.Activities.RunScript Enables you to execute Python code. You can input the code directly in the activity or provide a file path for it. Can only be used inside the Python Scope activity. Due to a software limitation, this…

Hope it helps!

Please check the sample workflow from the UIPath docs (at the end of the article).
Link for your reference -

Karthik Byggari

I have already visited both the links and tried to implement a simple file handling code in python which simply writes “hello World” to a file. But, its not working.