nika
(Veronika Soldatyenkova)
June 28, 2024, 8:16pm
1
Hi guys, I have faced an issue when I have import statements in my python script UiPath gives error: Pipe is broken. I have read all the forum regarding this question but nothing helps me. Script I am trying to run:
I have tried script without imports and it works
Json is set upped to my PC
Environment variables are added to the System variables
I have tried adding import to the function but still fails
I am using sequence:
Python scope
Load Python Script
Invoke Python Method
Get Python Object
Do you have any thoughts?
1 Like
Can you try this approach?
I tried with:
Python 3.12.4 installed at C:\Program Files\Python312
Studio 23.10.7
UiPath.Python.Activities.1.8.1
UiPath.System.Activities.23.10.6
Python code:
import sys
import os
sys.path.append(os.path.dirname(os.path.realpath('C:\\Program Files\\Python312')))
def simple_function():
import json
result = {"message": "Test"}
json_output = json.dumps(result)
return json_output
A similar approach was discussed here Integrating Python script for Encrypt and Decrypt
nika
(Veronika Soldatyenkova)
June 29, 2024, 12:44pm
3
Thank you so much, it is working!!
2 Likes
system
(system)
Closed
July 2, 2024, 12:45pm
4
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.