Skip to main content

I’m trying to run a python script as import file command. it simple give me a message as bot error but when i run the same script in IDE it works fine and generates the expected output. not sure what was missing while using AA command. Adding the code snippet for reference

f = open("samplefile1.txt", "w")
f.write("Hello World from python")
f.close()
 

Hi @rajeshramu ,

 

Can you share the Execute Python action’s screenshot?


 


 

 

Kindly share the details of Execute Script part.

 


Hi Padmakumar, 

Nothing much in execute command just the session name and output variable.

 


Hi Padmakumar, 

Nothing much in execute command just the session name and output variable.

 

 

Ok.  Refer this article and follow any of the workaround suggested and see whether it is helping or not.

 


@rajeshramu 

It worked for me with the absolute path and “/” instead of “\”

f = open("C:/test/samplefile1.txt", "w")

f.write("Hello World from python")

f.close()

 

 

HTH

Regards


@Raul Jaimes Thanks a lot!! it worked now.. earlier i tried the absolute path before but using backward slash. 


Hi Padmakumar, 

Nothing much in execute command just the session name and output variable.

Thanks Padmakumar for sharing the article as well.

 

 

Ok.  Refer this article and follow any of the workaround suggested and see whether it is helping or not.

 

 


Reply